getMediaContent
List Media content
List the media content according a criterias
/v1/media_content
Usage and SDK Samples
curl -X GET -H "x-api-key: [[apiKey]]" "https://recommendations.dive.tv/v1/media_content?byPageSize=&byTitle=&byPage=&byYear=&byType="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DashboardApi;
import java.io.File;
import java.util.*;
public class DashboardApiExample {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: api_key
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
api_key.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.setApiKeyPrefix("Token");
DashboardApi apiInstance = new DashboardApi();
String xApiKey = xApiKey_example; // String | Client API Key
String clientId = clientId_example; // String | Client Id. Each client will be provided with a clientId and an API Key
Integer byPageSize = 56; // Integer | Number of media returned. Max 50#{You may also query the endpont using the parameter name pageSize}
String byTitle = byTitle_example; // String | Title of the movie#{You may also query the endpont using the parameter name title}
Integer byPage = 56; // Integer | Number of page#{You may also query the endpont using the parameter name page}
Integer byYear = 56; // Integer | Year of the media#{You may also query the endpont using the parameter name year}
String byType = byType_example; // String | Content type to be queried#{You may also query the endpont using the parameter name type}
try {
apiInstance.getMediaContent(xApiKey, clientId, byPageSize, byTitle, byPage, byYear, byType);
} catch (ApiException e) {
System.err.println("Exception when calling DashboardApi#getMediaContent");
e.printStackTrace();
}
}
}
import io.swagger.client.api.DashboardApi;
public class DashboardApiExample {
public static void main(String[] args) {
DashboardApi apiInstance = new DashboardApi();
String xApiKey = xApiKey_example; // String | Client API Key
String clientId = clientId_example; // String | Client Id. Each client will be provided with a clientId and an API Key
Integer byPageSize = 56; // Integer | Number of media returned. Max 50#{You may also query the endpont using the parameter name pageSize}
String byTitle = byTitle_example; // String | Title of the movie#{You may also query the endpont using the parameter name title}
Integer byPage = 56; // Integer | Number of page#{You may also query the endpont using the parameter name page}
Integer byYear = 56; // Integer | Year of the media#{You may also query the endpont using the parameter name year}
String byType = byType_example; // String | Content type to be queried#{You may also query the endpont using the parameter name type}
try {
apiInstance.getMediaContent(xApiKey, clientId, byPageSize, byTitle, byPage, byYear, byType);
} catch (ApiException e) {
System.err.println("Exception when calling DashboardApi#getMediaContent");
e.printStackTrace();
}
}
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: api_key)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"x-api-key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"x-api-key"];
String *xApiKey = xApiKey_example; // Client API Key
String *clientId = clientId_example; // Client Id. Each client will be provided with a clientId and an API Key
Integer *byPageSize = 56; // Number of media returned. Max 50#{You may also query the endpont using the parameter name pageSize} (optional)
String *byTitle = byTitle_example; // Title of the movie#{You may also query the endpont using the parameter name title} (optional)
Integer *byPage = 56; // Number of page#{You may also query the endpont using the parameter name page} (optional)
Integer *byYear = 56; // Year of the media#{You may also query the endpont using the parameter name year} (optional)
String *byType = byType_example; // Content type to be queried#{You may also query the endpont using the parameter name type} (optional)
DashboardApi *apiInstance = [[DashboardApi alloc] init];
// List Media content
[apiInstance getMediaContentWith:xApiKey
clientId:clientId
byPageSize:byPageSize
byTitle:byTitle
byPage:byPage
byYear:byYear
byType:byType
completionHandler: ^(NSError* error) {
if (error) {
NSLog(@"Error: %@", error);
}
}];
var RecoEngineDev = require('reco_engine_dev');
var defaultClient = RecoEngineDev.ApiClient.instance;
// 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['x-api-key'] = "Token"
var api = new RecoEngineDev.DashboardApi()
var xApiKey = xApiKey_example; // {String} Client API Key
var clientId = clientId_example; // {String} Client Id. Each client will be provided with a clientId and an API Key
var opts = {
'byPageSize': 56, // {Integer} Number of media returned. Max 50#{You may also query the endpont using the parameter name pageSize}
'byTitle': byTitle_example, // {String} Title of the movie#{You may also query the endpont using the parameter name title}
'byPage': 56, // {Integer} Number of page#{You may also query the endpont using the parameter name page}
'byYear': 56, // {Integer} Year of the media#{You may also query the endpont using the parameter name year}
'byType': byType_example // {String} Content type to be queried#{You may also query the endpont using the parameter name type}
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
};
api.getMediaContent(xApiKey, clientId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class getMediaContentExample
{
public void main()
{
// Configure API key authorization: api_key
Configuration.Default.ApiKey.Add("x-api-key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.ApiKeyPrefix.Add("x-api-key", "Bearer");
var apiInstance = new DashboardApi();
var xApiKey = xApiKey_example; // String | Client API Key
var clientId = clientId_example; // String | Client Id. Each client will be provided with a clientId and an API Key
var byPageSize = 56; // Integer | Number of media returned. Max 50#{You may also query the endpont using the parameter name pageSize} (optional)
var byTitle = byTitle_example; // String | Title of the movie#{You may also query the endpont using the parameter name title} (optional)
var byPage = 56; // Integer | Number of page#{You may also query the endpont using the parameter name page} (optional)
var byYear = 56; // Integer | Year of the media#{You may also query the endpont using the parameter name year} (optional)
var byType = byType_example; // String | Content type to be queried#{You may also query the endpont using the parameter name type} (optional)
try
{
// List Media content
apiInstance.getMediaContent(xApiKey, clientId, byPageSize, byTitle, byPage, byYear, byType);
}
catch (Exception e)
{
Debug.Print("Exception when calling DashboardApi.getMediaContent: " + e.Message );
}
}
}
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: api_key
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
$api_instance = new Swagger\Client\Api\DashboardApi();
$xApiKey = xApiKey_example; // String | Client API Key
$clientId = clientId_example; // String | Client Id. Each client will be provided with a clientId and an API Key
$byPageSize = 56; // Integer | Number of media returned. Max 50#{You may also query the endpont using the parameter name pageSize}
$byTitle = byTitle_example; // String | Title of the movie#{You may also query the endpont using the parameter name title}
$byPage = 56; // Integer | Number of page#{You may also query the endpont using the parameter name page}
$byYear = 56; // Integer | Year of the media#{You may also query the endpont using the parameter name year}
$byType = byType_example; // String | Content type to be queried#{You may also query the endpont using the parameter name type}
try {
$api_instance->getMediaContent($xApiKey, $clientId, $byPageSize, $byTitle, $byPage, $byYear, $byType);
} catch (Exception $e) {
echo 'Exception when calling DashboardApi->getMediaContent: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DashboardApi;
# Configure API key authorization: api_key
$WWW::SwaggerClient::Configuration::api_key->{'x-api-key'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'x-api-key'} = "Bearer";
my $api_instance = WWW::SwaggerClient::DashboardApi->new();
my $xApiKey = xApiKey_example; # String | Client API Key
my $clientId = clientId_example; # String | Client Id. Each client will be provided with a clientId and an API Key
my $byPageSize = 56; # Integer | Number of media returned. Max 50#{You may also query the endpont using the parameter name pageSize}
my $byTitle = byTitle_example; # String | Title of the movie#{You may also query the endpont using the parameter name title}
my $byPage = 56; # Integer | Number of page#{You may also query the endpont using the parameter name page}
my $byYear = 56; # Integer | Year of the media#{You may also query the endpont using the parameter name year}
my $byType = byType_example; # String | Content type to be queried#{You may also query the endpont using the parameter name type}
eval {
$api_instance->getMediaContent(xApiKey => $xApiKey, clientId => $clientId, byPageSize => $byPageSize, byTitle => $byTitle, byPage => $byPage, byYear => $byYear, byType => $byType);
};
if ($@) {
warn "Exception when calling DashboardApi->getMediaContent: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# Configure API key authorization: api_key
swagger_client.configuration.api_key['x-api-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['x-api-key'] = 'Bearer'
# create an instance of the API class
api_instance = swagger_client.DashboardApi()
xApiKey = xApiKey_example # String | Client API Key
clientId = clientId_example # String | Client Id. Each client will be provided with a clientId and an API Key
byPageSize = 56 # Integer | Number of media returned. Max 50#{You may also query the endpont using the parameter name pageSize} (optional)
byTitle = byTitle_example # String | Title of the movie#{You may also query the endpont using the parameter name title} (optional)
byPage = 56 # Integer | Number of page#{You may also query the endpont using the parameter name page} (optional)
byYear = 56 # Integer | Year of the media#{You may also query the endpont using the parameter name year} (optional)
byType = byType_example # String | Content type to be queried#{You may also query the endpont using the parameter name type} (optional)
try:
# List Media content
api_instance.get_media_content(xApiKey, clientId, byPageSize=byPageSize, byTitle=byTitle, byPage=byPage, byYear=byYear, byType=byType)
except ApiException as e:
print("Exception when calling DashboardApi->getMediaContent: %s\n" % e)
Parameters
| Name | Description |
|---|---|
| x-api-key* |
String
Client API Key
Required
|
| client-id* |
String
Client Id. Each client will be provided with a clientId and an API Key
Required
|
| Name | Description |
|---|---|
| byPageSize |
Integer
Number of media returned. Max 50
You may also query the endpont using the parameter name pageSize
|
| byTitle |
String
Title of the movie
You may also query the endpont using the parameter name title
|
| byPage |
Integer
Number of page
You may also query the endpont using the parameter name page
|
| byYear |
Integer
Year of the media
You may also query the endpont using the parameter name year
|
| byType |
String
Content type to be queried
You may also query the endpont using the parameter name type
|
Responses
Status: 200 - OK
| Name | Type | Format | Description |
|---|---|---|---|
| Content-Type | String | ||
| Access-Control-Allow-Headers | String | ||
| Access-Control-Allow-Methods | String | ||
| Access-Control-Allow-Origin | String |
Status: 400 - Invalid Request
| Name | Type | Format | Description |
|---|---|---|---|
| Content-Type | String | ||
| Access-Control-Allow-Headers | String | ||
| Access-Control-Allow-Methods | String | ||
| Access-Control-Allow-Origin | String |
Status: 500 - Error Response
| Name | Type | Format | Description |
|---|---|---|---|
| Content-Type | String | ||
| Access-Control-Allow-Headers | String | ||
| Access-Control-Allow-Methods | String | ||
| Access-Control-Allow-Origin | String |
Status: 504 - Gateway Timeout
| Name | Type | Format | Description |
|---|---|---|---|
| Content-Type | String | ||
| Access-Control-Allow-Headers | String | ||
| Access-Control-Allow-Methods | String | ||
| Access-Control-Allow-Origin | String |