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 |
Media mediaGet(opts)
Find all registered Media
<p><strong>Permissions:</strong> ✓ Respondent ✗ Customer ✓ Manager</p>
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);
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] |
- Content-Type: application/json
- Accept: application/json
'String' mediaMediaIdDelete(mediaId)
Delete Media
<p><strong>Permissions:</strong> ✗ Respondent ✗ Customer ✓ Manager</p>
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);
Name | Type | Description | Notes |
---|---|---|---|
mediaId | Integer |
'String'
- Content-Type: application/json
- Accept: application/json
[Media] mediaMediaIdGet(mediaId, opts)
Find a Media
<p><strong>Permissions:</strong> ✓ Respondent ✗ Customer ✓ Manager</p>
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);
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] |
- Content-Type: application/json
- Accept: application/json
Media mediaMediaIdPut(mediaId, body)
Update a Media
<p><strong>Permissions:</strong> ✗ Respondent ✗ Customer ✓ Manager</p>
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);
Name | Type | Description | Notes |
---|---|---|---|
mediaId | Integer | ||
body | MediaCreation | Request body |
- Content-Type: application/json
- Accept: application/json
Media mediaPost(body)
Create new Media
<p><strong>Permissions:</strong> ✗ Respondent ✗ Customer ✓ Manager</p>
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);
Name | Type | Description | Notes |
---|---|---|---|
body | MediaCreation | Request body |
- Content-Type: application/json
- Accept: application/json