Skip to content

Latest commit

 

History

History
340 lines (240 loc) · 12 KB

MediaFilesApi.md

File metadata and controls

340 lines (240 loc) · 12 KB

MediaFilesApi

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

Method HTTP request Description
convertLiveToVod POST /media-sources/{source_id}/live2vod
createLive POST /media-sources/{source_id}/live
getLiveStreams GET /media-files/{media_file_id}/streams
getMediaFile GET /media-files/{media_file_id}
getMediaSourceFiles GET /media-sources/{source_id}/files
postMediaSourceFiles POST /media-sources/{source_id}/files

convertLiveToVod

convertLiveToVod($source_id, $body)

Convert Live to VOD

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: ApiClientId
Kinow\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Client-Id', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Kinow\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Client-Id', 'Bearer');
// Configure API key authorization: ApiClientSecret
Kinow\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Client-Secret', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Kinow\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Client-Secret', 'Bearer');

$api_instance = new Kinow\Client\Api\MediaFilesApi();
$source_id = 789; // int | Media source ID to fetch
$body = new \Kinow\Client\Model\ConvertMediaLiveRequest(); // \Kinow\Client\Model\ConvertMediaLiveRequest | Convert MediaLive object

try {
    $api_instance->convertLiveToVod($source_id, $body);
} catch (Exception $e) {
    echo 'Exception when calling MediaFilesApi->convertLiveToVod: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
source_id int Media source ID to fetch
body \Kinow\Client\Model\ConvertMediaLiveRequest Convert MediaLive object

Return type

void (empty response body)

Authorization

ApiClientId, ApiClientSecret

HTTP request headers

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

createLive

createLive($source_id, $body)

Create a live

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: ApiClientId
Kinow\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Client-Id', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Kinow\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Client-Id', 'Bearer');
// Configure API key authorization: ApiClientSecret
Kinow\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Client-Secret', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Kinow\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Client-Secret', 'Bearer');

$api_instance = new Kinow\Client\Api\MediaFilesApi();
$source_id = 789; // int | Media source ID to fetch
$body = new \Kinow\Client\Model\CreateMediaLiveRequest(); // \Kinow\Client\Model\CreateMediaLiveRequest | Create MediaFile object

try {
    $api_instance->createLive($source_id, $body);
} catch (Exception $e) {
    echo 'Exception when calling MediaFilesApi->createLive: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
source_id int Media source ID to fetch
body \Kinow\Client\Model\CreateMediaLiveRequest Create MediaFile object

Return type

void (empty response body)

Authorization

ApiClientId, ApiClientSecret

HTTP request headers

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

getLiveStreams

\Kinow\Client\Model\MediaFileStreamListResponse getLiveStreams($media_file_id)

Get live streams

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: ApiClientId
Kinow\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Client-Id', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Kinow\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Client-Id', 'Bearer');
// Configure API key authorization: ApiClientSecret
Kinow\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Client-Secret', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Kinow\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Client-Secret', 'Bearer');

$api_instance = new Kinow\Client\Api\MediaFilesApi();
$media_file_id = 789; // int | Media file ID to fetch

try {
    $result = $api_instance->getLiveStreams($media_file_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling MediaFilesApi->getLiveStreams: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
media_file_id int Media file ID to fetch

Return type

\Kinow\Client\Model\MediaFileStreamListResponse

Authorization

ApiClientId, ApiClientSecret

HTTP request headers

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

getMediaFile

\Kinow\Client\Model\MediaFileResponse getMediaFile($media_file_id)

Get Media file

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: ApiClientId
Kinow\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Client-Id', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Kinow\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Client-Id', 'Bearer');
// Configure API key authorization: ApiClientSecret
Kinow\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Client-Secret', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Kinow\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Client-Secret', 'Bearer');

$api_instance = new Kinow\Client\Api\MediaFilesApi();
$media_file_id = 789; // int | Media file ID to fetch

try {
    $result = $api_instance->getMediaFile($media_file_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling MediaFilesApi->getMediaFile: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
media_file_id int Media file ID to fetch

Return type

\Kinow\Client\Model\MediaFileResponse

Authorization

ApiClientId, ApiClientSecret

HTTP request headers

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

getMediaSourceFiles

\Kinow\Client\Model\MediaFileListResponse getMediaSourceFiles($source_id, $page, $per_page, $filters, $sort_by, $sort_direction)

Get media source files

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: ApiClientId
Kinow\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Client-Id', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Kinow\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Client-Id', 'Bearer');
// Configure API key authorization: ApiClientSecret
Kinow\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Client-Secret', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Kinow\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Client-Secret', 'Bearer');

$api_instance = new Kinow\Client\Api\MediaFilesApi();
$source_id = 789; // int | Media source ID to fetch
$page = 789; // int | 
$per_page = 789; // int | 
$filters = "filters_example"; // string | ``` name[value]=string&name[operator]=contains&date_add[value]=string&date_add[operator]=lt _______________  { \"name\": { \"value\": \"string\", \"operator\": \"contains\" }, \"date_add\": { \"value\": \"string\", \"operator\": \"lt\" } } ``` Operator can be: strict, contains, between, in, gt (greater than), lt (lower than).
$sort_by = "sort_by_example"; // string | Sort by this attribute (id by default)
$sort_direction = "sort_direction_example"; // string | Sorting direction (asc by default)

try {
    $result = $api_instance->getMediaSourceFiles($source_id, $page, $per_page, $filters, $sort_by, $sort_direction);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling MediaFilesApi->getMediaSourceFiles: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
source_id int Media source ID to fetch
page int [optional]
per_page int [optional]
filters string ``` name[value]=string&name[operator]=contains&date_add[value]=string&date_add[operator]=lt _______________ { &quot;name&quot;: { &quot;value&quot;: &quot;string&quot;, &quot;operator&quot;: &quot;contains&quot; }, &quot;date_add&quot;: { &quot;value&quot;: &quot;string&quot;, &quot;operator&quot;: &quot;lt&quot; } } ``` Operator can be: strict, contains, between, in, gt (greater than), lt (lower than). [optional]
sort_by string Sort by this attribute (id by default) [optional]
sort_direction string Sorting direction (asc by default) [optional]

Return type

\Kinow\Client\Model\MediaFileListResponse

Authorization

ApiClientId, ApiClientSecret

HTTP request headers

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

postMediaSourceFiles

\Kinow\Client\Model\MediaFileResponse postMediaSourceFiles($source_id, $body)

Post media file

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: ApiClientId
Kinow\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Client-Id', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Kinow\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Client-Id', 'Bearer');
// Configure API key authorization: ApiClientSecret
Kinow\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Client-Secret', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Kinow\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Client-Secret', 'Bearer');

$api_instance = new Kinow\Client\Api\MediaFilesApi();
$source_id = 789; // int | Media source ID to fetch
$body = new \Kinow\Client\Model\CreateMediaFileRequest(); // \Kinow\Client\Model\CreateMediaFileRequest | Create MediaFile object

try {
    $result = $api_instance->postMediaSourceFiles($source_id, $body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling MediaFilesApi->postMediaSourceFiles: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
source_id int Media source ID to fetch
body \Kinow\Client\Model\CreateMediaFileRequest Create MediaFile object

Return type

\Kinow\Client\Model\MediaFileResponse

Authorization

ApiClientId, ApiClientSecret

HTTP request headers

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