Skip to content

Latest commit

 

History

History
136 lines (100 loc) · 5.06 KB

GenreApi.md

File metadata and controls

136 lines (100 loc) · 5.06 KB

RadioManager\GenreApi

All URIs are relative to https://radiomanager.io/api/v2

Method HTTP request Description
getGenreById GET /genres/{id} Get genre by id
listGenres GET /genres List all genres.

getGenreById

\RadioManager\Model\GenreResult getGenreById($id, $_external_station_id)

Get genre by id

Get genre by id

Example

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

// Configure API key authorization: API Key
$config = RadioManager\Configuration::getDefaultConfiguration()->setApiKey('api-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = RadioManager\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer');

$apiInstance = new RadioManager\Api\GenreApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$id = 789; // int | ID of Genre **(Required)**
$_external_station_id = 789; // int | Query on a different (content providing) station *(Optional)*

try {
    $result = $apiInstance->getGenreById($id, $_external_station_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling GenreApi->getGenreById: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
id int ID of Genre (Required)
_external_station_id int Query on a different (content providing) station (Optional) [optional]

Return type

\RadioManager\Model\GenreResult

Authorization

[API Key](../../README.md#API Key)

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

listGenres

\RadioManager\Model\GenreResults listGenres($page, $parent_id, $program_id, $broadcast_id, $limit, $order_by, $order_direction, $_external_station_id)

List all genres.

List all genres.

Example

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

// Configure API key authorization: API Key
$config = RadioManager\Configuration::getDefaultConfiguration()->setApiKey('api-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = RadioManager\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer');

$apiInstance = new RadioManager\Api\GenreApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$page = 789; // int | Current page *(Optional)*
$parent_id = 789; // int | Search on Parent ID of Genre *(Optional)*
$program_id = 789; // int | Search on Program ID *(Optional)* `(Relation)`
$broadcast_id = 789; // int | Search on Broadcast ID *(Optional)* `(Relation)`
$limit = 789; // int | Results per page *(Optional)*
$order_by = "order_by_example"; // string | Field to order the results *(Optional)*
$order_direction = "order_direction_example"; // string | Direction of ordering *(Optional)*
$_external_station_id = 789; // int | Query on a different (content providing) station *(Optional)*

try {
    $result = $apiInstance->listGenres($page, $parent_id, $program_id, $broadcast_id, $limit, $order_by, $order_direction, $_external_station_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling GenreApi->listGenres: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
page int Current page (Optional) [optional]
parent_id int Search on Parent ID of Genre (Optional) [optional]
program_id int Search on Program ID (Optional) `(Relation)` [optional]
broadcast_id int Search on Broadcast ID (Optional) `(Relation)` [optional]
limit int Results per page (Optional) [optional]
order_by string Field to order the results (Optional) [optional]
order_direction string Direction of ordering (Optional) [optional]
_external_station_id int Query on a different (content providing) station (Optional) [optional]

Return type

\RadioManager\Model\GenreResults

Authorization

[API Key](../../README.md#API Key)

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]