Skip to content

Latest commit

 

History

History
152 lines (97 loc) · 4.6 KB

CMSCategoriesApi.md

File metadata and controls

152 lines (97 loc) · 4.6 KB

KinowJavascriptSdk.CMSCategoriesApi

All URIs are relative to https://api.kinow.com/api

Method HTTP request Description
createCMSCategory POST /cms-categories
getCMSCategories GET /cms-categories
updateCMSCategory PUT /cms-categories/{cms_category_id}

createCMSCategory

CMSCategory createCMSCategory(body)

Create cms category

Example

var KinowJavascriptSdk = require('kinow-javascript-sdk');

var apiInstance = new KinowJavascriptSdk.CMSCategoriesApi();

var body = new KinowJavascriptSdk.CMSCategory(); // CMSCategory | 

apiInstance.createCMSCategory(body).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Parameters

Name Type Description Notes
body CMSCategory

Return type

CMSCategory

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

getCMSCategories

CMSCategoriesLists getCMSCategories(opts)

Get cms categories

Example

var KinowJavascriptSdk = require('kinow-javascript-sdk');

var apiInstance = new KinowJavascriptSdk.CMSCategoriesApi();

var opts = { 
  'page': 789, // Integer | 
  'perPage': 789, // Integer | 
  'filters': "filters_example", // String |   ```  name[value]=string&name[operator]=contains&date_add[value]=string&date_add[operator]=lt  _______________    {      \"name\": {          \"value\": \"string\",          \"operator\": \"contains\"      },      \"date_add\": {          \"value\": \"string\",          \"operator\": \"lt\"      }  } ```  Operator can be strict, contains, gt or lt.
  'sortBy': "sortBy_example", // String | Sort by this attribute (id by default)
  'sortDirection': "sortDirection_example" // String | Sorting direction (asc by default)
};
apiInstance.getCMSCategories(opts).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Parameters

Name Type Description Notes
page Integer [optional]
perPage Integer [optional]
filters String ``` name[value]=string&name[operator]=contains&date_add[value]=string&date_add[operator]=lt _______________ { "name": { "value": "string", "operator": "contains" }, "date_add": { "value": "string", "operator": "lt" } } ``` Operator can be strict, contains, gt or lt. [optional]
sortBy String Sort by this attribute (id by default) [optional]
sortDirection String Sorting direction (asc by default) [optional]

Return type

CMSCategoriesLists

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

updateCMSCategory

CMSCategory updateCMSCategory(cmsCategoryId, body)

Update cms category

Example

var KinowJavascriptSdk = require('kinow-javascript-sdk');

var apiInstance = new KinowJavascriptSdk.CMSCategoriesApi();

var cmsCategoryId = 789; // Integer | CMS category ID to update

var body = new KinowJavascriptSdk.CMSCategory(); // CMSCategory | 

apiInstance.updateCMSCategory(cmsCategoryId, body).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Parameters

Name Type Description Notes
cmsCategoryId Integer CMS category ID to update
body CMSCategory

Return type

CMSCategory

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined