Class: RadioManagerClient::ItemApi

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ ItemApi

Returns a new instance of ItemApi.



19
20
21
# File 'lib/radiomanager_client/api/item_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/item_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#create_item(opts = {}) ⇒ PostSuccess

Create an new item. Create item.

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:



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

def create_item(opts = {})
  data, _status_code, _headers = create_item_with_http_info(opts)
  return data
end

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

Create an new item. Create item.

Parameters:

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

    the optional parameters

Options Hash (opts):

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
# File 'lib/radiomanager_client/api/item_api.rb', line 38

def create_item_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ItemApi.create_item ..."
  end
  # resource path
  local_var_path = "/items"

  # 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(: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: ItemApi#create_item\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#current_item_post_structure(opts = {}) ⇒ Success

Post a current playing item, keep structure Post a current playing item, keep structure

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:



79
80
81
82
# File 'lib/radiomanager_client/api/item_api.rb', line 79

def current_item_post_structure(opts = {})
  data, _status_code, _headers = current_item_post_structure_with_http_info(opts)
  return data
end

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

Post a current playing item, keep structure Post a current playing item, keep structure

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:

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

    Success data, response status code and response headers



89
90
91
92
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
# File 'lib/radiomanager_client/api/item_api.rb', line 89

def current_item_post_structure_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ItemApi.current_item_post_structure ..."
  end
  # resource path
  local_var_path = "/items/current/structure"

  # 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(: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 => 'Success')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ItemApi#current_item_post_structure\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#current_item_post_timing(opts = {}) ⇒ Success

Post a current playing item Post a current playing item

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:



130
131
132
133
# File 'lib/radiomanager_client/api/item_api.rb', line 130

def current_item_post_timing(opts = {})
  data, _status_code, _headers = current_item_post_timing_with_http_info(opts)
  return data
end

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

Post a current playing item Post a current playing item

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:

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

    Success data, response status code and response headers



140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
# File 'lib/radiomanager_client/api/item_api.rb', line 140

def current_item_post_timing_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ItemApi.current_item_post_timing ..."
  end
  # resource path
  local_var_path = "/items/current/timing"

  # 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(: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 => 'Success')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ItemApi#current_item_post_timing\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

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

Delete item by ID. Delete item by id.

Parameters:

  • id

    ID of Item **(Required)**

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

    the optional parameters

Returns:



181
182
183
184
# File 'lib/radiomanager_client/api/item_api.rb', line 181

def delete_item_by_id(id, opts = {})
  data, _status_code, _headers = delete_item_by_id_with_http_info(id, opts)
  return data
end

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

Delete item by ID. Delete item by id.

Parameters:

  • id

    ID of Item **(Required)**

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

    the optional parameters

Returns:

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

    Success data, response status code and response headers



191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
# File 'lib/radiomanager_client/api/item_api.rb', line 191

def delete_item_by_id_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ItemApi.delete_item_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 ItemApi.delete_item_by_id"
  end
  if @api_client.config.client_side_validation && id < 0
    fail ArgumentError, 'invalid value for "id" when calling ItemApi.delete_item_by_id, must be greater than or equal to 0.'
  end

  # resource path
  local_var_path = "/items/{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: ItemApi#delete_item_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_current_item(opts = {}) ⇒ ItemResult

Get current Item Get current Item

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :lastplayed (BOOLEAN)

    Show last played item if there is no current item*(Optional)*

Returns:



240
241
242
243
# File 'lib/radiomanager_client/api/item_api.rb', line 240

def get_current_item(opts = {})
  data, _status_code, _headers = get_current_item_with_http_info(opts)
  return data
end

#get_current_item_with_http_info(opts = {}) ⇒ Array<(ItemResult, Fixnum, Hash)>

Get current Item Get current Item

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :lastplayed (BOOLEAN)

    Show last played item if there is no current item*(Optional)*

Returns:

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

    ItemResult data, response status code and response headers



250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
# File 'lib/radiomanager_client/api/item_api.rb', line 250

def get_current_item_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ItemApi.get_current_item ..."
  end
  # resource path
  local_var_path = "/items/current"

  # query parameters
  query_params = {}
  query_params[:'lastplayed'] = opts[:'lastplayed'] if !opts[:'lastplayed'].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 => 'ItemResult')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ItemApi#get_current_item\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_item_by_id(id, opts = {}) ⇒ ItemResult

Get extended item details by ID. Read item by id.

Parameters:

  • id

    ID of Item **(Required)**

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

    the optional parameters

Options Hash (opts):

  • :_external_station_id (Integer)

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

Returns:



293
294
295
296
# File 'lib/radiomanager_client/api/item_api.rb', line 293

def get_item_by_id(id, opts = {})
  data, _status_code, _headers = get_item_by_id_with_http_info(id, opts)
  return data
end

#get_item_by_id_with_http_info(id, opts = {}) ⇒ Array<(ItemResult, Fixnum, Hash)>

Get extended item details by ID. Read item by id.

Parameters:

  • id

    ID of Item **(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<(ItemResult, Fixnum, Hash)>)

    ItemResult data, response status code and response headers



304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
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
# File 'lib/radiomanager_client/api/item_api.rb', line 304

def get_item_by_id_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ItemApi.get_item_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 ItemApi.get_item_by_id"
  end
  if @api_client.config.client_side_validation && id < 0
    fail ArgumentError, 'invalid value for "id" when calling ItemApi.get_item_by_id, must be greater than or equal to 0.'
  end

  # resource path
  local_var_path = "/items/{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 => 'ItemResult')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ItemApi#get_item_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_items(opts = {}) ⇒ ItemResults

Get a list of all the items currently in your station. Get a list of all the items currently in your station. This feature supports pagination and will give a maximum results of 50 items back.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    Current page *(Optional)*

  • :block_id (Integer)

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

  • :broadcast_id (Integer)

    Search on Broadcast 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;

  • :campaign_id (Integer)

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

  • :contact_id (Integer)

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

  • :program_draft_id (Integer)

    Search on Program Draft ID *(Optional)*

  • :user_draft_id (Integer)

    Search on User Draft ID *(Optional)*

  • :station_draft_id (Integer)

    Search on Station Draft ID *(Optional)*

  • :program_id (Integer)

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

  • :external_id (String)

    Search on External ID *(Optional)*

  • :start_min (DateTime)

    Minimum start date *(Optional)*

  • :start_max (DateTime)

    Maximum start date *(Optional)*

  • :duration_min (Integer)

    Minimum duration (seconds) *(Optional)*

  • :duration_max (Integer)

    Maximum duration (seconds) *(Optional)*

  • :status (String)

    Play Status of item *(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:



374
375
376
377
# File 'lib/radiomanager_client/api/item_api.rb', line 374

def list_items(opts = {})
  data, _status_code, _headers = list_items_with_http_info(opts)
  return data
end

#list_items_with_http_info(opts = {}) ⇒ Array<(ItemResults, Fixnum, Hash)>

Get a list of all the items currently in your station. Get a list of all the items currently in your station. This feature supports pagination and will give a maximum results of 50 items back.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    Current page *(Optional)*

  • :block_id (Integer)

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

  • :broadcast_id (Integer)

    Search on Broadcast 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;

  • :campaign_id (Integer)

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

  • :contact_id (Integer)

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

  • :program_draft_id (Integer)

    Search on Program Draft ID *(Optional)*

  • :user_draft_id (Integer)

    Search on User Draft ID *(Optional)*

  • :station_draft_id (Integer)

    Search on Station Draft ID *(Optional)*

  • :program_id (Integer)

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

  • :external_id (String)

    Search on External ID *(Optional)*

  • :start_min (DateTime)

    Minimum start date *(Optional)*

  • :start_max (DateTime)

    Maximum start date *(Optional)*

  • :duration_min (Integer)

    Minimum duration (seconds) *(Optional)*

  • :duration_max (Integer)

    Maximum duration (seconds) *(Optional)*

  • :status (String)

    Play Status of item *(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<(ItemResults, Fixnum, Hash)>)

    ItemResults data, response status code and response headers



404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
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
467
468
469
470
471
472
473
474
475
476
477
# File 'lib/radiomanager_client/api/item_api.rb', line 404

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

  if @api_client.config.client_side_validation && opts[:'status'] && !['scheduled', 'playing', 'played'].include?(opts[:'status'])
    fail ArgumentError, 'invalid value for "status", must be one of scheduled, playing, played'
  end
  if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 50
    fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ItemApi.list_items, 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 ItemApi.list_items, 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 = "/items"

  # query parameters
  query_params = {}
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'block_id'] = opts[:'block_id'] if !opts[:'block_id'].nil?
  query_params[:'broadcast_id'] = opts[:'broadcast_id'] if !opts[:'broadcast_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[:'campaign_id'] = opts[:'campaign_id'] if !opts[:'campaign_id'].nil?
  query_params[:'contact_id'] = opts[:'contact_id'] if !opts[:'contact_id'].nil?
  query_params[:'program_draft_id'] = opts[:'program_draft_id'] if !opts[:'program_draft_id'].nil?
  query_params[:'user_draft_id'] = opts[:'user_draft_id'] if !opts[:'user_draft_id'].nil?
  query_params[:'station_draft_id'] = opts[:'station_draft_id'] if !opts[:'station_draft_id'].nil?
  query_params[:'program_id'] = opts[:'program_id'] if !opts[:'program_id'].nil?
  query_params[:'external_id'] = opts[:'external_id'] if !opts[:'external_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[:'duration-min'] = opts[:'duration_min'] if !opts[:'duration_min'].nil?
  query_params[:'duration-max'] = opts[:'duration_max'] if !opts[:'duration_max'].nil?
  query_params[:'status'] = opts[:'status'] if !opts[:'status'].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 => 'ItemResults')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ItemApi#list_items\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#playlist_post_merge(opts = {}) ⇒ InlineResponse202

Post a playlist, do not remove previously imported items Post a playlist, do not remove previously imported items

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :data (Data2)

    Data *(Optional)*

Returns:



484
485
486
487
# File 'lib/radiomanager_client/api/item_api.rb', line 484

def playlist_post_merge(opts = {})
  data, _status_code, _headers = playlist_post_merge_with_http_info(opts)
  return data
end

#playlist_post_merge_with_http_info(opts = {}) ⇒ Array<(InlineResponse202, Fixnum, Hash)>

Post a playlist, do not remove previously imported items Post a playlist, do not remove previously imported items

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :data (Data2)

    Data *(Optional)*

Returns:

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

    InlineResponse202 data, response status code and response headers



494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
# File 'lib/radiomanager_client/api/item_api.rb', line 494

def playlist_post_merge_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ItemApi.playlist_post_merge ..."
  end
  # resource path
  local_var_path = "/items/playlist/merge"

  # 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(: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 => 'InlineResponse202')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ItemApi#playlist_post_merge\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#playlist_post_structure(opts = {}) ⇒ InlineResponse202

Post a playlist, keep current structure Post a playlist, keep current structure

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :data (Data1)

    Data *(Optional)*

Returns:



535
536
537
538
# File 'lib/radiomanager_client/api/item_api.rb', line 535

def playlist_post_structure(opts = {})
  data, _status_code, _headers = playlist_post_structure_with_http_info(opts)
  return data
end

#playlist_post_structure_with_http_info(opts = {}) ⇒ Array<(InlineResponse202, Fixnum, Hash)>

Post a playlist, keep current structure Post a playlist, keep current structure

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :data (Data1)

    Data *(Optional)*

Returns:

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

    InlineResponse202 data, response status code and response headers



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
573
574
575
576
577
578
579
# File 'lib/radiomanager_client/api/item_api.rb', line 545

def playlist_post_structure_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ItemApi.playlist_post_structure ..."
  end
  # resource path
  local_var_path = "/items/playlist/structure"

  # 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(: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 => 'InlineResponse202')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ItemApi#playlist_post_structure\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#playlist_post_timing(opts = {}) ⇒ InlineResponse202

Post a playlist Post a playlist

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :data (Data)

    Data *(Optional)*

Returns:



586
587
588
589
# File 'lib/radiomanager_client/api/item_api.rb', line 586

def playlist_post_timing(opts = {})
  data, _status_code, _headers = playlist_post_timing_with_http_info(opts)
  return data
end

#playlist_post_timing_with_http_info(opts = {}) ⇒ Array<(InlineResponse202, Fixnum, Hash)>

Post a playlist Post a playlist

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :data (Data)

    Data *(Optional)*

Returns:

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

    InlineResponse202 data, response status code and response headers



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
# File 'lib/radiomanager_client/api/item_api.rb', line 596

def playlist_post_timing_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ItemApi.playlist_post_timing ..."
  end
  # resource path
  local_var_path = "/items/playlist/timing"

  # 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(: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 => 'InlineResponse202')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ItemApi#playlist_post_timing\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#stop_current_item(opts = {}) ⇒ Success

Stop an Item Set a current playing or specific item on played

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :data (Data3)

    Data *(Optional)*

Returns:



637
638
639
640
# File 'lib/radiomanager_client/api/item_api.rb', line 637

def stop_current_item(opts = {})
  data, _status_code, _headers = stop_current_item_with_http_info(opts)
  return data
end

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

Stop an Item Set a current playing or specific item on played

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :data (Data3)

    Data *(Optional)*

Returns:

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

    Success data, response status code and response headers



647
648
649
650
651
652
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
# File 'lib/radiomanager_client/api/item_api.rb', line 647

def stop_current_item_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ItemApi.stop_current_item ..."
  end
  # resource path
  local_var_path = "/items/stopcurrent"

  # 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(: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 => 'Success')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ItemApi#stop_current_item\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

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

Update extended item details by ID. Update item by id.

Parameters:

  • id

    ID of Item **(Required)**

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

    the optional parameters

Options Hash (opts):

Returns:



689
690
691
692
# File 'lib/radiomanager_client/api/item_api.rb', line 689

def update_item_by_id(id, opts = {})
  data, _status_code, _headers = update_item_by_id_with_http_info(id, opts)
  return data
end

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

Update extended item details by ID. Update item by id.

Parameters:

  • id

    ID of Item **(Required)**

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

    the optional parameters

Options Hash (opts):

Returns:

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

    Success data, response status code and response headers



700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
# File 'lib/radiomanager_client/api/item_api.rb', line 700

def update_item_by_id_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ItemApi.update_item_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 ItemApi.update_item_by_id"
  end
  if @api_client.config.client_side_validation && id < 0
    fail ArgumentError, 'invalid value for "id" when calling ItemApi.update_item_by_id, must be greater than or equal to 0.'
  end

  # resource path
  local_var_path = "/items/{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: ItemApi#update_item_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end