Skip to content

Latest commit

 

History

History
306 lines (222 loc) · 10.4 KB

StoryApi.md

File metadata and controls

306 lines (222 loc) · 10.4 KB

RadioManager\StoryApi

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

Method HTTP request Description
createStory POST /stories Create story.
deleteStoryById DELETE /stories/{id} Delete story by id
getStoryById GET /stories/{id} Get story by id
listStories GET /stories Get all stories.
updateStoryByID PATCH /stories/{id} Update story by id

createStory

\RadioManager\Model\PostSuccess createStory($data)

Create story.

Create story.

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\StoryApi(
    // 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
);
$data = new \RadioManager\Model\StoryDataInput(); // \RadioManager\Model\StoryDataInput | Data **(Required)**

try {
    $result = $apiInstance->createStory($data);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling StoryApi->createStory: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
data \RadioManager\Model\StoryDataInput Data (Required)

Return type

\RadioManager\Model\PostSuccess

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]

deleteStoryById

\RadioManager\Model\Success deleteStoryById($id)

Delete story by id

Delete story 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\StoryApi(
    // 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 Story **(Required)**

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

Parameters

Name Type Description Notes
id int ID of Story (Required)

Return type

\RadioManager\Model\Success

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]

getStoryById

\RadioManager\Model\StoryResult getStoryById($id, $_external_station_id)

Get story by id

Get story 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\StoryApi(
    // 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 Story **(Required)**
$_external_station_id = 789; // int | Query on a different (content providing) station *(Optional)*

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

Parameters

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

Return type

\RadioManager\Model\StoryResult

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]

listStories

\RadioManager\Model\StoryResults listStories($page, $item_id, $model_type_id, $tag_id, $limit, $order_by, $order_direction, $_external_station_id)

Get all stories.

List all stories.

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\StoryApi(
    // 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 = 1; // int | Current page *(Optional)*
$item_id = 789; // int | Search on Item ID *(Optional)* `(Relation)`
$model_type_id = 789; // int | Search on ModelType ID *(Optional)* `(Relation)`
$tag_id = 789; // int | Search on Tag 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->listStories($page, $item_id, $model_type_id, $tag_id, $limit, $order_by, $order_direction, $_external_station_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling StoryApi->listStories: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
page int Current page (Optional) [optional] [default to 1]
item_id int Search on Item ID (Optional) `(Relation)` [optional]
model_type_id int Search on ModelType ID (Optional) `(Relation)` [optional]
tag_id int Search on Tag 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\StoryResults

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]

updateStoryByID

\RadioManager\Model\Success updateStoryByID($id, $data)

Update story by id

Update story 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\StoryApi(
    // 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 Story **(Required)**
$data = new \RadioManager\Model\StoryDataInput(); // \RadioManager\Model\StoryDataInput | Data *(Optional)*

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

Parameters

Name Type Description Notes
id int ID of Story (Required)
data \RadioManager\Model\StoryDataInput Data (Optional) [optional]

Return type

\RadioManager\Model\Success

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]