ContentType
Expression Extends:
class ContentType extends aggregate(ContentTypeModel, Helper)Helper class representing a Content Type.
Constructor Summary
| Public Constructor | ||
| public |
constructor(json: Object) Constructor for helper class representing a Content Type |
|
Method Summary
| Public Methods | ||
| public |
async getAttributes(params: Object, options: String): Promise Gets the attribute keys associated to this content type. |
|
Public Constructors
Public Methods
public async getAttributes(params: Object, options: String): Promise source
Gets the attribute keys associated to this content type.
Params:
| Name | Type | Attribute | Description |
| params | Object |
|
Parameters used to get information from server |
| params.id | Number |
|
Id to get data from the server |
| params.filters | Object |
|
Filters to be used for get |
| options | String |
|
Modify the nature of the call and response |
| options.url | String |
|
Override the url for this call |
| options.cacheMode | String |
|
Override the caching method for this call |
Example:
import { ContentType, clinical6 } from 'clinical6';
const contentType = new ContentType({ id: 23 });
contentType.getAttributes({ id: 5 });
contentType.getAttributes({ filters: { member_type: 'patient' }});
// Combined with clinical6.get
clinical6.get(ContentType).then(contentType => { contentType[0].getAttributes() });
Manual
Reference
Source
Test
