Skip to content

Latest commit

 

History

History
292 lines (203 loc) · 7.97 KB

MediaApi.md

File metadata and controls

292 lines (203 loc) · 7.97 KB

CrowdemotionApiClientJs.MediaApi

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

Method HTTP request Description
mediaGet GET /media Find all registered Media
mediaMediaIdDelete DELETE /media/{media_id} Delete Media
mediaMediaIdGet GET /media/{media_id} Find a Media
mediaMediaIdPut PUT /media/{media_id} Update a Media
mediaPost POST /media Create new Media

mediaGet

Media mediaGet(opts)

Find all registered Media

<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.MediaApi();

var opts = { 
  'skip': 56, // Integer | The number of results to skip.
  'limit': 56, // Integer | The maximum number of results to return.
  'where': "where_example", // String | JSON formatted string condition.
  'sort': "sort_example" // String | Attribute used to sort results.
};

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

Parameters

Name Type Description Notes
skip Integer The number of results to skip. [optional]
limit Integer The maximum number of results to return. [optional]
where String JSON formatted string condition. [optional]
sort String Attribute used to sort results. [optional]

Return type

Media

Authorization

api_key

HTTP request headers

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

mediaMediaIdDelete

'String' mediaMediaIdDelete(mediaId)

Delete Media

<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.MediaApi();

var mediaId = 56; // Integer | 


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

Parameters

Name Type Description Notes
mediaId Integer

Return type

'String'

Authorization

api_key

HTTP request headers

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

mediaMediaIdGet

[Media] mediaMediaIdGet(mediaId, opts)

Find a Media

<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.MediaApi();

var mediaId = 56; // Integer | ID of Media to search.

var opts = { 
  'presignedUrl': true // Boolean | Returns the presignedUrl whose value is a signed (protected) URL to hosted video on our premises.
};

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

Parameters

Name Type Description Notes
mediaId Integer ID of Media to search.
presignedUrl Boolean Returns the presignedUrl whose value is a signed (protected) URL to hosted video on our premises. [optional]

Return type

[Media]

Authorization

api_key

HTTP request headers

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

mediaMediaIdPut

Media mediaMediaIdPut(mediaId, body)

Update a Media

<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.MediaApi();

var mediaId = 56; // Integer | 

var body = new CrowdemotionApiClientJs.MediaCreation(); // MediaCreation | Request body


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

Parameters

Name Type Description Notes
mediaId Integer
body MediaCreation Request body

Return type

Media

Authorization

api_key

HTTP request headers

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

mediaPost

Media mediaPost(body)

Create new Media

<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.MediaApi();

var body = new CrowdemotionApiClientJs.MediaCreation(); // MediaCreation | Request body


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

Parameters

Name Type Description Notes
body MediaCreation Request body

Return type

Media

Authorization

api_key

HTTP request headers

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