Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions src/core/stack.js
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,32 @@ export default class Stack {
return Request(query);
}

/**
* @method getContentTypes
* @memberOf Stack
* @description getContentTypes get all the ContentTypes.
* @example Stack.getContentTypes()
* @example
* let data = Stack.getContentTypes()
* data.then(function(result) {
* // 'result' is list of contentTypes.
* }, function(error) {
* // error function
* })
* @returns {Promise}
* @instance
*/
getContentTypes() {
let query = {
headers: this.headers,
url: this.config.protocol + "://" + this.config.host + ':' + this.config.port + '/' + this.config.version + this.config.urls.content_types,
body: {
_method: 'GET',
environment: this.environment
}
};
return Request(query);
}

/**
* @method sync
Expand Down