Class: RadioManagerClient::BroadcastApi

Inherits:
Object
  • Object
show all
Defined in:
lib/radiomanager_client/api/broadcast_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ BroadcastApi

Returns a new instance of BroadcastApi.



19
20
21
# File 'lib/radiomanager_client/api/broadcast_api.rb', line 19

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



17
18
19
# File 'lib/radiomanager_client/api/broadcast_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#create_broadcast(data, opts = {}) ⇒ PostSuccess

Create broadcast. Create broadcast.

Parameters:

  • data

    Data **(Required)**

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



28
29
30
31
# File 'lib/radiomanager_client/api/broadcast_api.rb', line 28

def create_broadcast(data, opts = {})
  data, _status_code, _headers = create_broadcast_with_http_info(data, opts)
  return data
end

#create_broadcast_with_http_info(data, opts = {}) ⇒ Array<(PostSuccess, Fixnum, Hash)>

Create broadcast. Create broadcast.

Parameters:

  • data

    Data **(Required)**

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(PostSuccess, Fixnum, Hash)>)

    PostSuccess data, response status code and response headers



38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# File 'lib/radiomanager_client/api/broadcast_api.rb', line 38

def create_broadcast_with_http_info(data, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: BroadcastApi.create_broadcast ..."
  end
  # verify the required parameter 'data' is set
  if @api_client.config.client_side_validation && data.nil?
    fail ArgumentError, "Missing the required parameter 'data' when calling BroadcastApi.create_broadcast"
  end
  # resource path
  local_var_path = "/broadcasts"

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(data)
  auth_names = ['API Key']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'PostSuccess')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: BroadcastApi#create_broadcast\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_broadcast_by_id(id, opts = {}) ⇒ Success

Delete broadcast by id Delete broadcast by id

Parameters:

  • id

    ID of Broadcast **(Required)**

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



83
84
85
86
# File 'lib/radiomanager_client/api/broadcast_api.rb', line 83

def delete_broadcast_by_id(id, opts = {})
  data, _status_code, _headers = delete_broadcast_by_id_with_http_info(id, opts)
  return data
end

#delete_broadcast_by_id_with_http_info(id, opts = {}) ⇒ Array<(Success, Fixnum, Hash)>

Delete broadcast by id Delete broadcast by id

Parameters:

  • id

    ID of Broadcast **(Required)**

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Success, Fixnum, Hash)>)

    Success data, response status code and response headers



93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
# File 'lib/radiomanager_client/api/broadcast_api.rb', line 93

def delete_broadcast_by_id_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: BroadcastApi.delete_broadcast_by_id ..."
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling BroadcastApi.delete_broadcast_by_id"
  end
  if @api_client.config.client_side_validation && id < 0
    fail ArgumentError, 'invalid value for "id" when calling BroadcastApi.delete_broadcast_by_id, must be greater than or equal to 0.'
  end

  # resource path
  local_var_path = "/broadcasts/{id}".sub('{' + 'id' + '}', id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['API Key']
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Success')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: BroadcastApi#delete_broadcast_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_broadcast_by_id(id, opts = {}) ⇒ BroadcastResult

Get broadcast by id Get broadcast by id

Parameters:

  • id

    ID of Broadcast **(Required)**

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :_external_station_id (Integer)

    Query on a different (content providing) station *(Optional)*

Returns:



143
144
145
146
# File 'lib/radiomanager_client/api/broadcast_api.rb', line 143

def get_broadcast_by_id(id, opts = {})
  data, _status_code, _headers = get_broadcast_by_id_with_http_info(id, opts)
  return data
end

#get_broadcast_by_id_with_http_info(id, opts = {}) ⇒ Array<(BroadcastResult, Fixnum, Hash)>

Get broadcast by id Get broadcast by id

Parameters:

  • id

    ID of Broadcast **(Required)**

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :_external_station_id (Integer)

    Query on a different (content providing) station *(Optional)*

Returns:

  • (Array<(BroadcastResult, Fixnum, Hash)>)

    BroadcastResult data, response status code and response headers



154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
# File 'lib/radiomanager_client/api/broadcast_api.rb', line 154

def get_broadcast_by_id_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: BroadcastApi.get_broadcast_by_id ..."
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling BroadcastApi.get_broadcast_by_id"
  end
  if @api_client.config.client_side_validation && id < 0
    fail ArgumentError, 'invalid value for "id" when calling BroadcastApi.get_broadcast_by_id, must be greater than or equal to 0.'
  end

  # resource path
  local_var_path = "/broadcasts/{id}".sub('{' + 'id' + '}', id.to_s)

  # query parameters
  query_params = {}
  query_params[:'_external_station_id'] = opts[:'_external_station_id'] if !opts[:'_external_station_id'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['API Key']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'BroadcastResult')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: BroadcastApi#get_broadcast_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_current_broadcast(opts = {}) ⇒ BroadcastResult

Get current Broadcast Get current Broadcast

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :withunpublished (BOOLEAN)

    Show Unpublished *(Optional)*

Returns:



204
205
206
207
# File 'lib/radiomanager_client/api/broadcast_api.rb', line 204

def get_current_broadcast(opts = {})
  data, _status_code, _headers = get_current_broadcast_with_http_info(opts)
  return data
end

#get_current_broadcast_with_http_info(opts = {}) ⇒ Array<(BroadcastResult, Fixnum, Hash)>

Get current Broadcast Get current Broadcast

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :withunpublished (BOOLEAN)

    Show Unpublished *(Optional)*

Returns:

  • (Array<(BroadcastResult, Fixnum, Hash)>)

    BroadcastResult data, response status code and response headers



214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
# File 'lib/radiomanager_client/api/broadcast_api.rb', line 214

def get_current_broadcast_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: BroadcastApi.get_current_broadcast ..."
  end
  # resource path
  local_var_path = "/broadcasts/current"

  # query parameters
  query_params = {}
  query_params[:'withunpublished'] = opts[:'withunpublished'] if !opts[:'withunpublished'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['API Key']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'BroadcastResult')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: BroadcastApi#get_current_broadcast\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_daily_epg(opts = {}) ⇒ EPGResults

Get daily EPG Get current Broadcast

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :date (DateTime)

    Date *(Optional)*

  • :withunpublished (BOOLEAN)

    Show Unpublished *(Optional)*

Returns:



257
258
259
260
# File 'lib/radiomanager_client/api/broadcast_api.rb', line 257

def get_daily_epg(opts = {})
  data, _status_code, _headers = get_daily_epg_with_http_info(opts)
  return data
end

#get_daily_epg_with_http_info(opts = {}) ⇒ Array<(EPGResults, Fixnum, Hash)>

Get daily EPG Get current Broadcast

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :date (DateTime)

    Date *(Optional)*

  • :withunpublished (BOOLEAN)

    Show Unpublished *(Optional)*

Returns:

  • (Array<(EPGResults, Fixnum, Hash)>)

    EPGResults data, response status code and response headers



268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
# File 'lib/radiomanager_client/api/broadcast_api.rb', line 268

def get_daily_epg_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: BroadcastApi.get_daily_epg ..."
  end
  # resource path
  local_var_path = "/broadcasts/epg/daily"

  # query parameters
  query_params = {}
  query_params[:'date'] = opts[:'date'] if !opts[:'date'].nil?
  query_params[:'withunpublished'] = opts[:'withunpublished'] if !opts[:'withunpublished'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['API Key']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'EPGResults')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: BroadcastApi#get_daily_epg\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_epg_by_date(opts = {}) ⇒ EPGResults

Get EPG by date Get EPG by date

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :date (DateTime)

    Date *(Optional)*

  • :withunpublished (BOOLEAN)

    Show Unpublished *(Optional)*

Returns:



312
313
314
315
# File 'lib/radiomanager_client/api/broadcast_api.rb', line 312

def get_epg_by_date(opts = {})
  data, _status_code, _headers = get_epg_by_date_with_http_info(opts)
  return data
end

#get_epg_by_date_with_http_info(opts = {}) ⇒ Array<(EPGResults, Fixnum, Hash)>

Get EPG by date Get EPG by date

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :date (DateTime)

    Date *(Optional)*

  • :withunpublished (BOOLEAN)

    Show Unpublished *(Optional)*

Returns:

  • (Array<(EPGResults, Fixnum, Hash)>)

    EPGResults data, response status code and response headers



323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
# File 'lib/radiomanager_client/api/broadcast_api.rb', line 323

def get_epg_by_date_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: BroadcastApi.get_epg_by_date ..."
  end
  # resource path
  local_var_path = "/broadcasts/epg"

  # query parameters
  query_params = {}
  query_params[:'date'] = opts[:'date'] if !opts[:'date'].nil?
  query_params[:'withunpublished'] = opts[:'withunpublished'] if !opts[:'withunpublished'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['API Key']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'EPGResults')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: BroadcastApi#get_epg_by_date\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_next_broadcast(opts = {}) ⇒ BroadcastResult

Get next Broadcast Get next Broadcast

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :withunpublished (BOOLEAN)

    Show Unpublished *(Optional)*

Returns:



366
367
368
369
# File 'lib/radiomanager_client/api/broadcast_api.rb', line 366

def get_next_broadcast(opts = {})
  data, _status_code, _headers = get_next_broadcast_with_http_info(opts)
  return data
end

#get_next_broadcast_with_http_info(opts = {}) ⇒ Array<(BroadcastResult, Fixnum, Hash)>

Get next Broadcast Get next Broadcast

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :withunpublished (BOOLEAN)

    Show Unpublished *(Optional)*

Returns:

  • (Array<(BroadcastResult, Fixnum, Hash)>)

    BroadcastResult data, response status code and response headers



376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
# File 'lib/radiomanager_client/api/broadcast_api.rb', line 376

def get_next_broadcast_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: BroadcastApi.get_next_broadcast ..."
  end
  # resource path
  local_var_path = "/broadcasts/next"

  # query parameters
  query_params = {}
  query_params[:'withunpublished'] = opts[:'withunpublished'] if !opts[:'withunpublished'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['API Key']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'BroadcastResult')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: BroadcastApi#get_next_broadcast\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_weekly_epg(opts = {}) ⇒ EPGResults

Get weekly EPG Get weekly EPG

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :date (String)

    Date *(Optional)*

  • :withunpublished (BOOLEAN)

    Show Unpublished *(Optional)*

Returns:



419
420
421
422
# File 'lib/radiomanager_client/api/broadcast_api.rb', line 419

def get_weekly_epg(opts = {})
  data, _status_code, _headers = get_weekly_epg_with_http_info(opts)
  return data
end

#get_weekly_epg_with_http_info(opts = {}) ⇒ Array<(EPGResults, Fixnum, Hash)>

Get weekly EPG Get weekly EPG

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :date (String)

    Date *(Optional)*

  • :withunpublished (BOOLEAN)

    Show Unpublished *(Optional)*

Returns:

  • (Array<(EPGResults, Fixnum, Hash)>)

    EPGResults data, response status code and response headers



430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
# File 'lib/radiomanager_client/api/broadcast_api.rb', line 430

def get_weekly_epg_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: BroadcastApi.get_weekly_epg ..."
  end
  # resource path
  local_var_path = "/broadcasts/epg/weekly"

  # query parameters
  query_params = {}
  query_params[:'date'] = opts[:'date'] if !opts[:'date'].nil?
  query_params[:'withunpublished'] = opts[:'withunpublished'] if !opts[:'withunpublished'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['API Key']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'EPGResults')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: BroadcastApi#get_weekly_epg\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_broadcasts(opts = {}) ⇒ BroadcastResults

Get all broadcasts. List all broadcasts.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    Current page *(Optional)* (default to 1)

  • :program_id (Integer)

    Search on Program ID *(Optional)* &#x60;(Relation)&#x60;

  • :block_id (Integer)

    Search on Block ID *(Optional)* &#x60;(Relation)&#x60;

  • :model_type_id (Integer)

    Search on ModelType ID *(Optional)* &#x60;(Relation)&#x60;

  • :tag_id (Integer)

    Search on Tag ID *(Optional)* &#x60;(Relation)&#x60;

  • :presenter_id (Integer)

    Search on Presenter ID *(Optional)* &#x60;(Relation)&#x60;

  • :genre_id (Integer)

    Search on Genre ID *(Optional)* &#x60;(Relation)&#x60;

  • :item_id (Integer)

    Search on Item ID *(Optional)* &#x60;(Relation)&#x60;

  • :start_min (DateTime)

    Minimum start date *(Optional)*

  • :start_max (DateTime)

    Maximum start date *(Optional)*

  • :limit (Integer)

    Results per page *(Optional)*

  • :order_by (String)

    Field to order the results *(Optional)*

  • :order_direction (String)

    Direction of ordering *(Optional)*

  • :_external_station_id (Integer)

    Query on a different (content providing) station *(Optional)*

Returns:



486
487
488
489
# File 'lib/radiomanager_client/api/broadcast_api.rb', line 486

def list_broadcasts(opts = {})
  data, _status_code, _headers = list_broadcasts_with_http_info(opts)
  return data
end

#list_broadcasts_with_http_info(opts = {}) ⇒ Array<(BroadcastResults, Fixnum, Hash)>

Get all broadcasts. List all broadcasts.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    Current page *(Optional)*

  • :program_id (Integer)

    Search on Program ID *(Optional)* &#x60;(Relation)&#x60;

  • :block_id (Integer)

    Search on Block ID *(Optional)* &#x60;(Relation)&#x60;

  • :model_type_id (Integer)

    Search on ModelType ID *(Optional)* &#x60;(Relation)&#x60;

  • :tag_id (Integer)

    Search on Tag ID *(Optional)* &#x60;(Relation)&#x60;

  • :presenter_id (Integer)

    Search on Presenter ID *(Optional)* &#x60;(Relation)&#x60;

  • :genre_id (Integer)

    Search on Genre ID *(Optional)* &#x60;(Relation)&#x60;

  • :item_id (Integer)

    Search on Item ID *(Optional)* &#x60;(Relation)&#x60;

  • :start_min (DateTime)

    Minimum start date *(Optional)*

  • :start_max (DateTime)

    Maximum start date *(Optional)*

  • :limit (Integer)

    Results per page *(Optional)*

  • :order_by (String)

    Field to order the results *(Optional)*

  • :order_direction (String)

    Direction of ordering *(Optional)*

  • :_external_station_id (Integer)

    Query on a different (content providing) station *(Optional)*

Returns:

  • (Array<(BroadcastResults, Fixnum, Hash)>)

    BroadcastResults data, response status code and response headers



509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
# File 'lib/radiomanager_client/api/broadcast_api.rb', line 509

def list_broadcasts_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: BroadcastApi.list_broadcasts ..."
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 0
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling BroadcastApi.list_broadcasts, must be greater than or equal to 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 50
    fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling BroadcastApi.list_broadcasts, must be smaller than or equal to 50.'
  end

  if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
    fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling BroadcastApi.list_broadcasts, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && opts[:'order_direction'] && !['asc', 'desc'].include?(opts[:'order_direction'])
    fail ArgumentError, 'invalid value for "order_direction", must be one of asc, desc'
  end
  # resource path
  local_var_path = "/broadcasts"

  # query parameters
  query_params = {}
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'program_id'] = opts[:'program_id'] if !opts[:'program_id'].nil?
  query_params[:'block_id'] = opts[:'block_id'] if !opts[:'block_id'].nil?
  query_params[:'model_type_id'] = opts[:'model_type_id'] if !opts[:'model_type_id'].nil?
  query_params[:'tag_id'] = opts[:'tag_id'] if !opts[:'tag_id'].nil?
  query_params[:'presenter_id'] = opts[:'presenter_id'] if !opts[:'presenter_id'].nil?
  query_params[:'genre_id'] = opts[:'genre_id'] if !opts[:'genre_id'].nil?
  query_params[:'item_id'] = opts[:'item_id'] if !opts[:'item_id'].nil?
  query_params[:'start-min'] = opts[:'start_min'] if !opts[:'start_min'].nil?
  query_params[:'start-max'] = opts[:'start_max'] if !opts[:'start_max'].nil?
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
  query_params[:'order-by'] = opts[:'order_by'] if !opts[:'order_by'].nil?
  query_params[:'order-direction'] = opts[:'order_direction'] if !opts[:'order_direction'].nil?
  query_params[:'_external_station_id'] = opts[:'_external_station_id'] if !opts[:'_external_station_id'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['API Key']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'BroadcastResults')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: BroadcastApi#list_broadcasts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

Print broadcast by id with template Print broadcast by id with template

Parameters:

  • id

    ID of Broadcast **(Required)**

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :template_id (Integer)

    Search on template ID *(Optional)*

Returns:

  • (String)


580
581
582
583
# File 'lib/radiomanager_client/api/broadcast_api.rb', line 580

def print_broadcast_by_id(id, opts = {})
  data, _status_code, _headers = print_broadcast_by_id_with_http_info(id, opts)
  return data
end

Print broadcast by id with template Print broadcast by id with template

Parameters:

  • id

    ID of Broadcast **(Required)**

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :template_id (Integer)

    Search on template ID *(Optional)*

Returns:

  • (Array<(String, Fixnum, Hash)>)

    String data, response status code and response headers



591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
# File 'lib/radiomanager_client/api/broadcast_api.rb', line 591

def print_broadcast_by_id_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: BroadcastApi.print_broadcast_by_id ..."
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling BroadcastApi.print_broadcast_by_id"
  end
  if @api_client.config.client_side_validation && id < 0
    fail ArgumentError, 'invalid value for "id" when calling BroadcastApi.print_broadcast_by_id, must be greater than or equal to 0.'
  end

  # resource path
  local_var_path = "/broadcasts/print/{id}".sub('{' + 'id' + '}', id.to_s)

  # query parameters
  query_params = {}
  query_params[:'template_id'] = opts[:'template_id'] if !opts[:'template_id'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['API Key']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'String')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: BroadcastApi#print_broadcast_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_broadcast_by_id(id, opts = {}) ⇒ Success

Update broadcast by id Update broadcast by id

Parameters:

  • id

    ID of Broadcast **(Required)**

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:



642
643
644
645
# File 'lib/radiomanager_client/api/broadcast_api.rb', line 642

def update_broadcast_by_id(id, opts = {})
  data, _status_code, _headers = update_broadcast_by_id_with_http_info(id, opts)
  return data
end

#update_broadcast_by_id_with_http_info(id, opts = {}) ⇒ Array<(Success, Fixnum, Hash)>

Update broadcast by id Update broadcast by id

Parameters:

  • id

    ID of Broadcast **(Required)**

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:

  • (Array<(Success, Fixnum, Hash)>)

    Success data, response status code and response headers



653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
# File 'lib/radiomanager_client/api/broadcast_api.rb', line 653

def update_broadcast_by_id_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: BroadcastApi.update_broadcast_by_id ..."
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling BroadcastApi.update_broadcast_by_id"
  end
  if @api_client.config.client_side_validation && id < 0
    fail ArgumentError, 'invalid value for "id" when calling BroadcastApi.update_broadcast_by_id, must be greater than or equal to 0.'
  end

  # resource path
  local_var_path = "/broadcasts/{id}".sub('{' + 'id' + '}', id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(opts[:'data'])
  auth_names = ['API Key']
  data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Success')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: BroadcastApi#update_broadcast_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end