Skip to content

Latest commit

 

History

History
253 lines (184 loc) · 11.1 KB

FaceVideoApi.md

File metadata and controls

253 lines (184 loc) · 11.1 KB

CrowdemotionApiClientJs.FaceVideoApi

All URIs are relative to https://api.crowdemotion.co.uk/v1

Method HTTP request Description
facevideoFacevideoIdDelete DELETE /facevideo/{facevideo_id} Delete a FaceVideo
facevideoGet GET /facevideo Find a FaceVideo
facevideoPost POST /facevideo Analyse FaceVideo
facevideoPut PUT /facevideo Analyse FaceVideo

facevideoFacevideoIdDelete

'String' facevideoFacevideoIdDelete(facevideoId)

Delete a FaceVideo

<p>Use this operation to delete a FaceVideo.</p> <p><strong>Permissions:</strong> ✗ Respondent ✗ Customer ✓ Manager</p>

Example

var CrowdemotionApiClientJs = require('crowdemotion-api-client-js');
var defaultClient = CrowdemotionApiClientJs.ApiClient.default;

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

var apiInstance = new CrowdemotionApiClientJs.FaceVideoApi();

var facevideoId = 56; // Integer | ID of FaceVideo to be deleted.


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.facevideoFacevideoIdDelete(facevideoId, callback);

Parameters

Name Type Description Notes
facevideoId Integer ID of FaceVideo to be deleted.

Return type

'String'

Authorization

api_key

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

facevideoGet

FaceVideo facevideoGet(opts)

Find a FaceVideo

<p>Use this operation to access information about the FaceVideo analysis.</p> <p><i>Any one of the two parameters must be specified.</i></p> <p>To discover if the video has been analyzed, check the meaning of status field in the following table:</p> <table> <tr><td>Value</td> <td>Description</td></tr> <tr><td>0</td> <td>Not started</td></tr> <tr><td>1</td> <td>Processing started</td></tr> <tr><td>2</td> <td>Processing completed</td></tr> <tr><td>-1</td> <td>Error</td></tr> </table> <p><strong>Permissions:</strong> ✓ Respondent ✓ Customer ✓ Manager</p>

Example

var CrowdemotionApiClientJs = require('crowdemotion-api-client-js');
var defaultClient = CrowdemotionApiClientJs.ApiClient.default;

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

var apiInstance = new CrowdemotionApiClientJs.FaceVideoApi();

var opts = { 
  'facevideoId': 56, // Integer | FaceVideo ID. NOTE: Only this parameter is considered if both are specified.
  'responseId': 56 // Integer | Response ID corresponding to the FaceVideo.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.facevideoGet(opts, callback);

Parameters

Name Type Description Notes
facevideoId Integer FaceVideo ID. NOTE: Only this parameter is considered if both are specified. [optional]
responseId Integer Response ID corresponding to the FaceVideo. [optional]

Return type

FaceVideo

Authorization

api_key

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

facevideoPost

FaceVideo facevideoPost(opts)

Analyse FaceVideo

<p>Starts the analysis of a single FaceVideo (in the supported formats) through either:</p> <ol> <li>a video URL pointing to a resource accessible through the Internet without authentication</li> <li>the binary contents of the video in the request's body, encoded as <code>multipart/form-data</code> content type</li> </ol> <p>The third option is a <code>PUT</code> call to <code>/v1/facevideo/{filename}</code> (<code>filename</code> required string e.g. <code>facevideo1.mp4</code>) which supports all the URL parameters as above with a body encoding <code>application/octet-stream</code> and the file contents as plain binary: this call makes uploads more efficient but it does not respect HTTP/RESTful standards so it may be not supported in future.</p> <p><strong>Permissions:</strong> ✓ Respondent ✓ Customer ✓ Manager</p>

Example

var CrowdemotionApiClientJs = require('crowdemotion-api-client-js');
var defaultClient = CrowdemotionApiClientJs.ApiClient.default;

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

var apiInstance = new CrowdemotionApiClientJs.FaceVideoApi();

var opts = { 
  'filename': "/path/to/file.txt", // File | FaceVideo to be analysed.
  'sandbox': true, // Boolean | Generates random data for testing, at no cost. Default: false.
  'responseId': 56, // Integer | Associates this Facevideo to a previously generated Response.
  'researchId': 56, // Integer | Associates this Facevideo to a previously generated Research.
  'mediaId': 56, // Integer | Associates this Facevideo to a previously generated Media.
  'respondentId': 56, // Integer | Associates this Facevideo to a previously generated Respondent.
  'processVideo': true // Boolean | Actually processes the video. Default: true.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.facevideoPost(opts, callback);

Parameters

Name Type Description Notes
filename File FaceVideo to be analysed. [optional]
sandbox Boolean Generates random data for testing, at no cost. Default: false. [optional]
responseId Integer Associates this Facevideo to a previously generated Response. [optional]
researchId Integer Associates this Facevideo to a previously generated Research. [optional]
mediaId Integer Associates this Facevideo to a previously generated Media. [optional]
respondentId Integer Associates this Facevideo to a previously generated Respondent. [optional]
processVideo Boolean Actually processes the video. Default: true. [optional]

Return type

FaceVideo

Authorization

api_key

HTTP request headers

  • Content-Type: multipart/form-data
  • Accept: application/json

facevideoPut

FaceVideo facevideoPut(opts)

Analyse FaceVideo

<p>Starts the analysis of a single FaceVideo (in the supported formats) through either:</p> <ol> <li>a video URL pointing to a resource accessible through the Internet without authentication</li> <li>the binary contents of the video in the request's body, encoded as <code>multipart/form-data</code> content type</li> </ol> <p>The third option is a <code>PUT</code> call to <code>/v1/facevideo/{filename}</code> (<code>filename</code> required string e.g. <code>facevideo1.mp4</code>) which supports all the URL parameters as above with a body encoding <code>application/octet-stream</code> and the file contents as plain binary: this call makes uploads more efficient but it does not respect HTTP/RESTful standards so it may be not supported in future.</p> <p><strong>Permissions:</strong> ✓ Respondent ✓ Customer ✓ Manager</p>

Example

var CrowdemotionApiClientJs = require('crowdemotion-api-client-js');
var defaultClient = CrowdemotionApiClientJs.ApiClient.default;

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

var apiInstance = new CrowdemotionApiClientJs.FaceVideoApi();

var opts = { 
  'sandbox': true, // Boolean | Generates random data for testing, at no cost. Default: false.
  'responseId': 56, // Integer | Associates this Facevideo to a previously generated Response.
  'researchId': 56, // Integer | Associates this Facevideo to a previously generated Research.
  'mediaId': 56, // Integer | Associates this Facevideo to a previously generated Media.
  'respondentId': 56, // Integer | Associates this Facevideo to a previously generated Respondent.
  'processVideo': true, // Boolean | Actually processes the video. Default: true.
  'body': new CrowdemotionApiClientJs.FaceVideoUpload() // FaceVideoUpload | Request body
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.facevideoPut(opts, callback);

Parameters

Name Type Description Notes
sandbox Boolean Generates random data for testing, at no cost. Default: false. [optional]
responseId Integer Associates this Facevideo to a previously generated Response. [optional]
researchId Integer Associates this Facevideo to a previously generated Research. [optional]
mediaId Integer Associates this Facevideo to a previously generated Media. [optional]
respondentId Integer Associates this Facevideo to a previously generated Respondent. [optional]
processVideo Boolean Actually processes the video. Default: true. [optional]
body FaceVideoUpload Request body [optional]

Return type

FaceVideo

Authorization

api_key

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json