Skip to content

Latest commit

 

History

History
443 lines (304 loc) · 15.5 KB

BlogPagesApi.md

File metadata and controls

443 lines (304 loc) · 15.5 KB

KinowJavascriptSdk.BlogPagesApi

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

Method HTTP request Description
attachFeaturesToBlogPage POST /blog-pages/{blog_page_id}/features
attachProductToBlogPage POST /blog-pages/{blog_page_id}/products
detachProductFromBlogPage DELETE /blog-pages/{blog_page_id}/products/{product_id}
getBlogPage GET /blog-pages/{blog_page_id}
getBlogPageFeatures GET /blog-pages/{blog_page_id}/features
getBlogPageProducts GET /blog-pages/{blog_page_id}/products
getBlogPages GET /blog-pages

attachFeaturesToBlogPage

attachFeaturesToBlogPage(blogPageId, features)

Attach feature to blog page

Example

var KinowJavascriptSdk = require('kinow-javascript-sdk');
var defaultClient = KinowJavascriptSdk.ApiClient.instance;

// Configure API key authorization: ApiClientId
var ApiClientId = defaultClient.authentications['ApiClientId'];
ApiClientId.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiClientId.apiKeyPrefix = 'Token';

// Configure API key authorization: ApiClientSecret
var ApiClientSecret = defaultClient.authentications['ApiClientSecret'];
ApiClientSecret.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiClientSecret.apiKeyPrefix = 'Token';

var apiInstance = new KinowJavascriptSdk.BlogPagesApi();

var blogPageId = 789; // Integer | 

var features = "features_example"; // String |      To attach existing FeatureValue to blog page:     ```     [{     \"id_feature\":3,     \"id_feature_value\":5     }]     ```      To create a custom FeatureValue:     ```     [{     \"id_feature\":3,     \"custom_value\":[{     \"lang\": 1,     \"value\": \"string\"     }]     }]     ```

apiInstance.attachFeaturesToBlogPage(blogPageId, features).then(function() {
  console.log('API called successfully.');
}, function(error) {
  console.error(error);
});

Parameters

Name Type Description Notes
blogPageId Integer
features String To attach existing FeatureValue to blog page: ``` [{ "id_feature":3, "id_feature_value":5 }] ``` To create a custom FeatureValue: ``` [{ "id_feature":3, "custom_value":[{ "lang": 1, "value": "string" }] }] ```

Return type

null (empty response body)

Authorization

ApiClientId, ApiClientSecret

HTTP request headers

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

attachProductToBlogPage

attachProductToBlogPage(blogPageId, productId)

Attach product to blog page

Example

var KinowJavascriptSdk = require('kinow-javascript-sdk');
var defaultClient = KinowJavascriptSdk.ApiClient.instance;

// Configure API key authorization: ApiClientId
var ApiClientId = defaultClient.authentications['ApiClientId'];
ApiClientId.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiClientId.apiKeyPrefix = 'Token';

// Configure API key authorization: ApiClientSecret
var ApiClientSecret = defaultClient.authentications['ApiClientSecret'];
ApiClientSecret.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiClientSecret.apiKeyPrefix = 'Token';

var apiInstance = new KinowJavascriptSdk.BlogPagesApi();

var blogPageId = 789; // Integer | Page ID to fetch

var productId = 789; // Integer | Product ID to attach

apiInstance.attachProductToBlogPage(blogPageId, productId).then(function() {
  console.log('API called successfully.');
}, function(error) {
  console.error(error);
});

Parameters

Name Type Description Notes
blogPageId Integer Page ID to fetch
productId Integer Product ID to attach

Return type

null (empty response body)

Authorization

ApiClientId, ApiClientSecret

HTTP request headers

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

detachProductFromBlogPage

detachProductFromBlogPage(blogPageId, productId)

Detach product from blog page

Example

var KinowJavascriptSdk = require('kinow-javascript-sdk');
var defaultClient = KinowJavascriptSdk.ApiClient.instance;

// Configure API key authorization: ApiClientId
var ApiClientId = defaultClient.authentications['ApiClientId'];
ApiClientId.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiClientId.apiKeyPrefix = 'Token';

// Configure API key authorization: ApiClientSecret
var ApiClientSecret = defaultClient.authentications['ApiClientSecret'];
ApiClientSecret.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiClientSecret.apiKeyPrefix = 'Token';

var apiInstance = new KinowJavascriptSdk.BlogPagesApi();

var blogPageId = 789; // Integer | Page ID to fetch

var productId = 789; // Integer | Product ID to detach

apiInstance.detachProductFromBlogPage(blogPageId, productId).then(function() {
  console.log('API called successfully.');
}, function(error) {
  console.error(error);
});

Parameters

Name Type Description Notes
blogPageId Integer Page ID to fetch
productId Integer Product ID to detach

Return type

null (empty response body)

Authorization

ApiClientId, ApiClientSecret

HTTP request headers

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

getBlogPage

BlogPageResponse getBlogPage(blogPageId)

Get blog page

Example

var KinowJavascriptSdk = require('kinow-javascript-sdk');
var defaultClient = KinowJavascriptSdk.ApiClient.instance;

// Configure API key authorization: ApiClientId
var ApiClientId = defaultClient.authentications['ApiClientId'];
ApiClientId.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiClientId.apiKeyPrefix = 'Token';

// Configure API key authorization: ApiClientSecret
var ApiClientSecret = defaultClient.authentications['ApiClientSecret'];
ApiClientSecret.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiClientSecret.apiKeyPrefix = 'Token';

var apiInstance = new KinowJavascriptSdk.BlogPagesApi();

var blogPageId = 789; // Integer | Page ID to fetch

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

Parameters

Name Type Description Notes
blogPageId Integer Page ID to fetch

Return type

BlogPageResponse

Authorization

ApiClientId, ApiClientSecret

HTTP request headers

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

getBlogPageFeatures

FeatureListResponse getBlogPageFeatures(blogPageId, opts)

Get blog page features

Example

var KinowJavascriptSdk = require('kinow-javascript-sdk');
var defaultClient = KinowJavascriptSdk.ApiClient.instance;

// Configure API key authorization: ApiClientId
var ApiClientId = defaultClient.authentications['ApiClientId'];
ApiClientId.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiClientId.apiKeyPrefix = 'Token';

// Configure API key authorization: ApiClientSecret
var ApiClientSecret = defaultClient.authentications['ApiClientSecret'];
ApiClientSecret.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiClientSecret.apiKeyPrefix = 'Token';

var apiInstance = new KinowJavascriptSdk.BlogPagesApi();

var blogPageId = 789; // Integer | Blog page ID to fetch

var opts = { 
  'page': 789, // Integer | 
  'perPage': 789 // Integer | 
};
apiInstance.getBlogPageFeatures(blogPageId, opts).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Parameters

Name Type Description Notes
blogPageId Integer Blog page ID to fetch
page Integer [optional]
perPage Integer [optional]

Return type

FeatureListResponse

Authorization

ApiClientId, ApiClientSecret

HTTP request headers

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

getBlogPageProducts

BlogPageProductsResponse getBlogPageProducts(blogPageId, opts)

Get products linked to a blog page

Example

var KinowJavascriptSdk = require('kinow-javascript-sdk');
var defaultClient = KinowJavascriptSdk.ApiClient.instance;

// Configure API key authorization: ApiClientId
var ApiClientId = defaultClient.authentications['ApiClientId'];
ApiClientId.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiClientId.apiKeyPrefix = 'Token';

// Configure API key authorization: ApiClientSecret
var ApiClientSecret = defaultClient.authentications['ApiClientSecret'];
ApiClientSecret.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiClientSecret.apiKeyPrefix = 'Token';

var apiInstance = new KinowJavascriptSdk.BlogPagesApi();

var blogPageId = 789; // Integer | Page ID to fetch

var opts = { 
  'page': 789, // Integer | 
  'perPage': 789 // Integer | 
  'sortBy': "sortBy_example", // String | Sort by this attribute (id by default)
  'sortDirection': "sortDirection_example" // String | Sorting direction (asc by default)
  '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, between, in, gt (greater than), lt (lower than).
};
apiInstance.getBlogPageProducts(blogPageId, opts).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Parameters

Name Type Description Notes
blogPageId Integer Page ID to fetch
page Integer [optional]
perPage Integer [optional]
sortBy String Sort by this attribute (id by default) [optional]
sortDirection String Sorting direction (asc by default) [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, between, in, gt (greater than), lt (lower than). [optional]

Return type

BlogPageProductsResponse

Authorization

ApiClientId, ApiClientSecret

HTTP request headers

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

getBlogPages

BlogPageListResponse getBlogPages(opts)

Get blog pages

Example

var KinowJavascriptSdk = require('kinow-javascript-sdk');
var defaultClient = KinowJavascriptSdk.ApiClient.instance;

// Configure API key authorization: ApiClientId
var ApiClientId = defaultClient.authentications['ApiClientId'];
ApiClientId.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiClientId.apiKeyPrefix = 'Token';

// Configure API key authorization: ApiClientSecret
var ApiClientSecret = defaultClient.authentications['ApiClientSecret'];
ApiClientSecret.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiClientSecret.apiKeyPrefix = 'Token';

var apiInstance = new KinowJavascriptSdk.BlogPagesApi();

var opts = { 
  'page': 789, // Integer | 
  'perPage': 789 // Integer | 
  'sortBy': "sortBy_example", // String | Sort by this attribute (id by default)
  'sortDirection': "sortDirection_example" // String | Sorting direction (asc by default)
  '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, between, in, gt (greater than), lt (lower than).
};
apiInstance.getBlogPages(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]
sortBy String Sort by this attribute (id by default) [optional]
sortDirection String Sorting direction (asc by default) [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, between, in, gt (greater than), lt (lower than). [optional]

Return type

BlogPageListResponse

Authorization

ApiClientId, ApiClientSecret

HTTP request headers

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