File tree Expand file tree Collapse file tree 3 files changed +65
-4
lines changed
Expand file tree Collapse file tree 3 files changed +65
-4
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ node_modules/*
44.idea /*
55reports /*
66apidocs-templates /*
7- test /smtpconfig.js
8- test /config.js
9- test /sync_config.js
7+ test /smtpconfig.js /*
8+ test /config.js /*
9+ test /sync_config.js /*
10+ test /report.json /*
Original file line number Diff line number Diff line change @@ -289,5 +289,4 @@ export default class Entry {
289289 console . error ( "Kindly provide an entry uid. e.g. .Entry('bltsomething123')" ) ;
290290 }
291291 }
292-
293292}
Original file line number Diff line number Diff line change @@ -249,6 +249,35 @@ export default class Stack {
249249 return Utils . merge ( entry , this ) ;
250250 }
251251
252+ /**
253+ * @method fetch
254+ * @memberOf Stack
255+ * @description This method will returns information of a specific content type. It returns the content type schema.
256+ * @example
257+ * let single_contenttype = Stack.ContentType(content_type_uid).fetch()
258+ * single_contenttype
259+ * .then(function(result) {
260+ * // 'result' is a single contentType information.
261+ * }).catch((error) => {
262+ * console.log(error)
263+ * });
264+ * @returns {ContentType }
265+ * @instance
266+ */
267+ fetch ( ) {
268+ let result = {
269+ method : 'POST' ,
270+ headers : this . headers ,
271+ url : this . config . protocol + "://" + this . config . host + ':' + this . config . port + '/' + this . config . version + this . config . urls . content_types + this . content_type_uid ,
272+ body : {
273+ _method : 'GET' ,
274+ environment : this . environment
275+ }
276+ } ;
277+ return Request ( result ) ;
278+
279+ }
280+
252281 /**
253282 * @method Assets
254283 * @memberOf Stack
@@ -309,6 +338,38 @@ export default class Stack {
309338 return Request ( query ) ;
310339 }
311340
341+ /**
342+ * @method getContentTypes
343+ * @memberOf Stack
344+ * @description getContentTypes method returns comprehensive information of all the content types available in a particular stack in your account.
345+ * @example Stack.getContentTypes()
346+ * @example
347+ * let data = Stack.getContentTypes()
348+ * data
349+ * .then(function(result) {
350+ * // 'result' is list of contentTypes.
351+ * }, function(error) {
352+ * // error function
353+ * })
354+ * @returns {Stack }
355+ * @instance
356+ */
357+ getContentTypes ( ) {
358+ let query = {
359+ method : 'POST' ,
360+ headers : this . headers ,
361+ url : this . config . protocol + "://" + this . config . host + ':' + this . config . port + '/' + this . config . version + this . config . urls . content_types ,
362+ body : {
363+ _method : 'GET' ,
364+ environment : this . environment
365+ }
366+ } ;
367+ return Request ( query ) ;
368+ }
369+
370+
371+
372+
312373
313374 /**
314375 * @method sync
You can’t perform that action at this time.
0 commit comments