Content types
Log in to add to favouritesGet a content type
Gets an existing content type by the content type id or by passing a ContentTypeGetOptions object as an argument.
get(idOrOptions: string | ContentTypeGetOptions): Promise<ContentType>
Returns
A Promise that will resolve with a ContentType object.
Example
client.contentTypes.get('movie')
.then(result => {
console.log('API call result: ', result);
})
.catch(error => {
console.log('API call fetch error: ', error);
});
client.contentTypes.get({
id: 'movie',
versionStatus: 'published'
})
.then(result => {
console.log('API call result: ', result);
})
.catch(error => {
console.log('API call fetch error: ', error);
});
client.contentTypes.get({
id: 'movie',
version: '1.2'
})
.then(result => {
console.log('API call result: ', result);
})
.catch(error => {
console.log('API call fetch error: ', error);
});