Skip to content

Latest commit

 

History

History
623 lines (442 loc) · 19.8 KB

BroadcastApi.md

File metadata and controls

623 lines (442 loc) · 19.8 KB

RadioManagerClient::BroadcastApi

Load the API package

use RadioManagerClient::Object::BroadcastApi;

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

Method HTTP request Description
create_broadcast POST /broadcasts Create broadcast.
delete_broadcast_by_id DELETE /broadcasts/{id} Delete broadcast by id
get_broadcast_by_id GET /broadcasts/{id} Get broadcast by id
get_current_broadcast GET /broadcasts/current Get current Broadcast
get_daily_epg GET /broadcasts/epg/daily Get daily EPG
get_epg_by_date GET /broadcasts/epg Get EPG by date
get_next_broadcast GET /broadcasts/next Get next Broadcast
get_weekly_epg GET /broadcasts/epg/weekly Get weekly EPG
list_broadcasts GET /broadcasts Get all broadcasts.
print_broadcast_by_id GET /broadcasts/print/{id} Print broadcast by id with template
update_broadcast_by_id PATCH /broadcasts/{id} Update broadcast by id

create_broadcast

PostSuccess create_broadcast(data => $data)

Create broadcast.

Create broadcast.

Example

use Data::Dumper;
use RadioManagerClient::BroadcastApi;
my $api_instance = RadioManagerClient::BroadcastApi->new(

    # Configure API key authorization: API Key
    api_key => {'api-key' => 'YOUR_API_KEY'},
    # uncomment below to setup prefix (e.g. Bearer) for API key, if needed
    #api_key_prefix => {'api-key' => 'Bearer'},
);

my $data = RadioManagerClient::Object::BroadcastDataInput->new(); # BroadcastDataInput | Data **(Required)**

eval { 
    my $result = $api_instance->create_broadcast(data => $data);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling BroadcastApi->create_broadcast: $@\n";
}

Parameters

Name Type Description Notes
data BroadcastDataInput Data (Required)

Return type

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]

delete_broadcast_by_id

Success delete_broadcast_by_id(id => $id)

Delete broadcast by id

Delete broadcast by id

Example

use Data::Dumper;
use RadioManagerClient::BroadcastApi;
my $api_instance = RadioManagerClient::BroadcastApi->new(

    # Configure API key authorization: API Key
    api_key => {'api-key' => 'YOUR_API_KEY'},
    # uncomment below to setup prefix (e.g. Bearer) for API key, if needed
    #api_key_prefix => {'api-key' => 'Bearer'},
);

my $id = 789; # int | ID of Broadcast **(Required)**

eval { 
    my $result = $api_instance->delete_broadcast_by_id(id => $id);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling BroadcastApi->delete_broadcast_by_id: $@\n";
}

Parameters

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

Return type

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]

get_broadcast_by_id

BroadcastResult get_broadcast_by_id(id => $id, _external_station_id => $_external_station_id)

Get broadcast by id

Get broadcast by id

Example

use Data::Dumper;
use RadioManagerClient::BroadcastApi;
my $api_instance = RadioManagerClient::BroadcastApi->new(

    # Configure API key authorization: API Key
    api_key => {'api-key' => 'YOUR_API_KEY'},
    # uncomment below to setup prefix (e.g. Bearer) for API key, if needed
    #api_key_prefix => {'api-key' => 'Bearer'},
);

my $id = 789; # int | ID of Broadcast **(Required)**
my $_external_station_id = 789; # int | Query on a different (content providing) station *(Optional)*

eval { 
    my $result = $api_instance->get_broadcast_by_id(id => $id, _external_station_id => $_external_station_id);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling BroadcastApi->get_broadcast_by_id: $@\n";
}

Parameters

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

Return type

BroadcastResult

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]

get_current_broadcast

BroadcastResult get_current_broadcast(withunpublished => $withunpublished)

Get current Broadcast

Get current Broadcast

Example

use Data::Dumper;
use RadioManagerClient::BroadcastApi;
my $api_instance = RadioManagerClient::BroadcastApi->new(

    # Configure API key authorization: API Key
    api_key => {'api-key' => 'YOUR_API_KEY'},
    # uncomment below to setup prefix (e.g. Bearer) for API key, if needed
    #api_key_prefix => {'api-key' => 'Bearer'},
);

my $withunpublished = 1; # boolean | Show Unpublished *(Optional)*

eval { 
    my $result = $api_instance->get_current_broadcast(withunpublished => $withunpublished);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling BroadcastApi->get_current_broadcast: $@\n";
}

Parameters

Name Type Description Notes
withunpublished boolean Show Unpublished (Optional) [optional]

Return type

BroadcastResult

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]

get_daily_epg

EPGResults get_daily_epg(date => $date, withunpublished => $withunpublished)

Get daily EPG

Get current Broadcast

Example

use Data::Dumper;
use RadioManagerClient::BroadcastApi;
my $api_instance = RadioManagerClient::BroadcastApi->new(

    # Configure API key authorization: API Key
    api_key => {'api-key' => 'YOUR_API_KEY'},
    # uncomment below to setup prefix (e.g. Bearer) for API key, if needed
    #api_key_prefix => {'api-key' => 'Bearer'},
);

my $date = DateTime->from_epoch(epoch => str2time('2013-10-20T19:20:30+01:00')); # DateTime | Date *(Optional)*
my $withunpublished = 1; # boolean | Show Unpublished *(Optional)*

eval { 
    my $result = $api_instance->get_daily_epg(date => $date, withunpublished => $withunpublished);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling BroadcastApi->get_daily_epg: $@\n";
}

Parameters

Name Type Description Notes
date DateTime Date (Optional) [optional]
withunpublished boolean Show Unpublished (Optional) [optional]

Return type

EPGResults

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]

get_epg_by_date

EPGResults get_epg_by_date(date => $date, withunpublished => $withunpublished)

Get EPG by date

Get EPG by date

Example

use Data::Dumper;
use RadioManagerClient::BroadcastApi;
my $api_instance = RadioManagerClient::BroadcastApi->new(

    # Configure API key authorization: API Key
    api_key => {'api-key' => 'YOUR_API_KEY'},
    # uncomment below to setup prefix (e.g. Bearer) for API key, if needed
    #api_key_prefix => {'api-key' => 'Bearer'},
);

my $date = DateTime->from_epoch(epoch => str2time('2013-10-20T19:20:30+01:00')); # DateTime | Date *(Optional)*
my $withunpublished = 1; # boolean | Show Unpublished *(Optional)*

eval { 
    my $result = $api_instance->get_epg_by_date(date => $date, withunpublished => $withunpublished);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling BroadcastApi->get_epg_by_date: $@\n";
}

Parameters

Name Type Description Notes
date DateTime Date (Optional) [optional]
withunpublished boolean Show Unpublished (Optional) [optional]

Return type

EPGResults

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]

get_next_broadcast

BroadcastResult get_next_broadcast(withunpublished => $withunpublished)

Get next Broadcast

Get next Broadcast

Example

use Data::Dumper;
use RadioManagerClient::BroadcastApi;
my $api_instance = RadioManagerClient::BroadcastApi->new(

    # Configure API key authorization: API Key
    api_key => {'api-key' => 'YOUR_API_KEY'},
    # uncomment below to setup prefix (e.g. Bearer) for API key, if needed
    #api_key_prefix => {'api-key' => 'Bearer'},
);

my $withunpublished = 1; # boolean | Show Unpublished *(Optional)*

eval { 
    my $result = $api_instance->get_next_broadcast(withunpublished => $withunpublished);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling BroadcastApi->get_next_broadcast: $@\n";
}

Parameters

Name Type Description Notes
withunpublished boolean Show Unpublished (Optional) [optional]

Return type

BroadcastResult

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]

get_weekly_epg

EPGResults get_weekly_epg(date => $date, withunpublished => $withunpublished)

Get weekly EPG

Get weekly EPG

Example

use Data::Dumper;
use RadioManagerClient::BroadcastApi;
my $api_instance = RadioManagerClient::BroadcastApi->new(

    # Configure API key authorization: API Key
    api_key => {'api-key' => 'YOUR_API_KEY'},
    # uncomment below to setup prefix (e.g. Bearer) for API key, if needed
    #api_key_prefix => {'api-key' => 'Bearer'},
);

my $date = 'date_example'; # string | Date *(Optional)*
my $withunpublished = 1; # boolean | Show Unpublished *(Optional)*

eval { 
    my $result = $api_instance->get_weekly_epg(date => $date, withunpublished => $withunpublished);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling BroadcastApi->get_weekly_epg: $@\n";
}

Parameters

Name Type Description Notes
date string Date (Optional) [optional]
withunpublished boolean Show Unpublished (Optional) [optional]

Return type

EPGResults

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]

list_broadcasts

BroadcastResults list_broadcasts(page => $page, program_id => $program_id, block_id => $block_id, model_type_id => $model_type_id, tag_id => $tag_id, presenter_id => $presenter_id, genre_id => $genre_id, item_id => $item_id, start_min => $start_min, start_max => $start_max, limit => $limit, order_by => $order_by, order_direction => $order_direction, _external_station_id => $_external_station_id)

Get all broadcasts.

List all broadcasts.

Example

use Data::Dumper;
use RadioManagerClient::BroadcastApi;
my $api_instance = RadioManagerClient::BroadcastApi->new(

    # Configure API key authorization: API Key
    api_key => {'api-key' => 'YOUR_API_KEY'},
    # uncomment below to setup prefix (e.g. Bearer) for API key, if needed
    #api_key_prefix => {'api-key' => 'Bearer'},
);

my $page = 789; # int | Current page *(Optional)*
my $program_id = 789; # int | Search on Program ID *(Optional)* `(Relation)`
my $block_id = 789; # int | Search on Block ID *(Optional)* `(Relation)`
my $model_type_id = 789; # int | Search on ModelType ID *(Optional)* `(Relation)`
my $tag_id = 789; # int | Search on Tag ID *(Optional)* `(Relation)`
my $presenter_id = 789; # int | Search on Presenter ID *(Optional)* `(Relation)`
my $genre_id = 789; # int | Search on Genre ID *(Optional)* `(Relation)`
my $item_id = 789; # int | Search on Item ID *(Optional)* `(Relation)`
my $start_min = DateTime->from_epoch(epoch => str2time('2013-10-20T19:20:30+01:00')); # DateTime | Minimum start date *(Optional)*
my $start_max = DateTime->from_epoch(epoch => str2time('2013-10-20T19:20:30+01:00')); # DateTime | Maximum start date *(Optional)*
my $limit = 789; # int | Results per page *(Optional)*
my $order_by = 'order_by_example'; # string | Field to order the results *(Optional)*
my $order_direction = 'order_direction_example'; # string | Direction of ordering *(Optional)*
my $_external_station_id = 789; # int | Query on a different (content providing) station *(Optional)*

eval { 
    my $result = $api_instance->list_broadcasts(page => $page, program_id => $program_id, block_id => $block_id, model_type_id => $model_type_id, tag_id => $tag_id, presenter_id => $presenter_id, genre_id => $genre_id, item_id => $item_id, start_min => $start_min, start_max => $start_max, limit => $limit, order_by => $order_by, order_direction => $order_direction, _external_station_id => $_external_station_id);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling BroadcastApi->list_broadcasts: $@\n";
}

Parameters

Name Type Description Notes
page int Current page (Optional) [optional] [default to 1]
program_id int Search on Program ID (Optional) `(Relation)` [optional]
block_id int Search on Block 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]
presenter_id int Search on Presenter ID (Optional) `(Relation)` [optional]
genre_id int Search on Genre ID (Optional) `(Relation)` [optional]
item_id int Search on Item ID (Optional) `(Relation)` [optional]
start_min DateTime Minimum start date (Optional) [optional]
start_max DateTime Maximum start date (Optional) [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

BroadcastResults

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]

print_broadcast_by_id

string print_broadcast_by_id(id => $id, template_id => $template_id)

Print broadcast by id with template

Print broadcast by id with template

Example

use Data::Dumper;
use RadioManagerClient::BroadcastApi;
my $api_instance = RadioManagerClient::BroadcastApi->new(

    # Configure API key authorization: API Key
    api_key => {'api-key' => 'YOUR_API_KEY'},
    # uncomment below to setup prefix (e.g. Bearer) for API key, if needed
    #api_key_prefix => {'api-key' => 'Bearer'},
);

my $id = 789; # int | ID of Broadcast **(Required)**
my $template_id = 789; # int | Search on template ID *(Optional)*

eval { 
    my $result = $api_instance->print_broadcast_by_id(id => $id, template_id => $template_id);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling BroadcastApi->print_broadcast_by_id: $@\n";
}

Parameters

Name Type Description Notes
id int ID of Broadcast (Required)
template_id int Search on template ID (Optional) [optional]

Return type

string

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]

update_broadcast_by_id

Success update_broadcast_by_id(id => $id, data => $data)

Update broadcast by id

Update broadcast by id

Example

use Data::Dumper;
use RadioManagerClient::BroadcastApi;
my $api_instance = RadioManagerClient::BroadcastApi->new(

    # Configure API key authorization: API Key
    api_key => {'api-key' => 'YOUR_API_KEY'},
    # uncomment below to setup prefix (e.g. Bearer) for API key, if needed
    #api_key_prefix => {'api-key' => 'Bearer'},
);

my $id = 789; # int | ID of Broadcast **(Required)**
my $data = RadioManagerClient::Object::BroadcastDataInput->new(); # BroadcastDataInput | Data *(Optional)*

eval { 
    my $result = $api_instance->update_broadcast_by_id(id => $id, data => $data);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling BroadcastApi->update_broadcast_by_id: $@\n";
}

Parameters

Name Type Description Notes
id int ID of Broadcast (Required)
data BroadcastDataInput Data (Optional) [optional]

Return type

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]