Skip to content

Latest commit

 

History

History
243 lines (151 loc) · 7.54 KB

FeatureValuesApi.md

File metadata and controls

243 lines (151 loc) · 7.54 KB

KinowJavascriptSdk.FeatureValuesApi

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

Method HTTP request Description
attachFeaturesToExtract POST /extracts/{extract_id}/features
attachFeaturesToProduct POST /products/{product_id}/features
attachFeaturesToVideo POST /videos/{video_id}/features
detachFeatureToProduct DELETE /products/{product_id}/features/{feature_id}
getFeatureValues GET /feature-values

attachFeaturesToExtract

attachFeaturesToExtract(extractId, features)

Attach feature to extract

Example

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

var apiInstance = new KinowJavascriptSdk.FeatureValuesApi();

var extractId = 789; // Integer | 

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

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

Parameters

Name Type Description Notes
extractId Integer
features String To attach existing FeatureValue to Product: ``` [{ "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

No authorization required

HTTP request headers

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

attachFeaturesToProduct

attachFeaturesToProduct(productId, features)

Attach feature to product

Example

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

var apiInstance = new KinowJavascriptSdk.FeatureValuesApi();

var productId = 789; // Integer | 

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

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

Parameters

Name Type Description Notes
productId Integer
features String To attach existing FeatureValue to Product: ``` [{ "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

No authorization required

HTTP request headers

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

attachFeaturesToVideo

attachFeaturesToVideo(videoId, features)

Attach feature to video

Example

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

var apiInstance = new KinowJavascriptSdk.FeatureValuesApi();

var videoId = 789; // Integer | 

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

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

Parameters

Name Type Description Notes
videoId Integer
features String To attach existing FeatureValue to Product: ``` [{ "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

No authorization required

HTTP request headers

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

detachFeatureToProduct

detachFeatureToProduct(productId, featureId)

Detach feature to product

Example

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

var apiInstance = new KinowJavascriptSdk.FeatureValuesApi();

var productId = 789; // Integer | 

var featureId = 789; // Integer | 

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

Parameters

Name Type Description Notes
productId Integer
featureId Integer

Return type

null (empty response body)

Authorization

No authorization required

HTTP request headers

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

getFeatureValues

Products1 getFeatureValues(opts)

Get feature value list

Example

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

var apiInstance = new KinowJavascriptSdk.FeatureValuesApi();

var opts = { 
  'page': 789, // Integer | 
  'perPage': 789 // Integer | 
};
apiInstance.getFeatureValues(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]

Return type

Products1

Authorization

No authorization required

HTTP request headers

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