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_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:



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

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



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
286
287
288
289
290
291
292
293
294
295
# File 'lib/radiomanager_client/api/item_api.rb', line 252

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;

  • :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:



321
322
323
324
# File 'lib/radiomanager_client/api/item_api.rb', line 321

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;

  • :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



350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
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
412
413
414
415
416
417
418
419
420
421
422
# File 'lib/radiomanager_client/api/item_api.rb', line 350

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[:'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_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:



429
430
431
432
# File 'lib/radiomanager_client/api/item_api.rb', line 429

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



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

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:



480
481
482
483
# File 'lib/radiomanager_client/api/item_api.rb', line 480

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



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

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

#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:



532
533
534
535
# File 'lib/radiomanager_client/api/item_api.rb', line 532

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



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
573
574
575
576
577
578
579
580
581
582
583
584
585
# File 'lib/radiomanager_client/api/item_api.rb', line 543

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