radiomanager_client 1.0.99 → 1.0.100

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +11 -5
  3. data/docs/BlockApi.md +13 -7
  4. data/docs/BroadcastApi.md +36 -24
  5. data/docs/BroadcastEPGDay.md +9 -0
  6. data/docs/BroadcastEPGRelations.md +13 -0
  7. data/docs/BroadcastEPGResult.md +40 -0
  8. data/docs/CampaignApi.md +9 -3
  9. data/docs/ContactApi.md +11 -5
  10. data/docs/EPGResults.md +10 -0
  11. data/docs/ExternalMessageApi.md +1 -1
  12. data/docs/GenreApi.md +7 -1
  13. data/docs/ItemApi.md +27 -25
  14. data/docs/ModelTypeApi.md +9 -3
  15. data/docs/PresenterApi.md +9 -3
  16. data/docs/PresenterEPGResult.md +18 -0
  17. data/docs/ProgramApi.md +17 -11
  18. data/docs/StationApi.md +57 -0
  19. data/docs/StationResult.md +8 -0
  20. data/docs/StationResultStation.md +33 -0
  21. data/docs/StoryApi.md +11 -5
  22. data/docs/StoryDataInput.md +1 -0
  23. data/docs/StringApi.md +1 -1
  24. data/docs/TagApi.md +7 -1
  25. data/docs/UserApi.md +8 -2
  26. data/docs/VisualSlideApi.md +1 -1
  27. data/lib/radiomanager_client/api/block_api.rb +29 -9
  28. data/lib/radiomanager_client/api/broadcast_api.rb +58 -29
  29. data/lib/radiomanager_client/api/campaign_api.rb +23 -3
  30. data/lib/radiomanager_client/api/contact_api.rb +25 -5
  31. data/lib/radiomanager_client/api/genre_api.rb +20 -0
  32. data/lib/radiomanager_client/api/item_api.rb +50 -39
  33. data/lib/radiomanager_client/api/model_type_api.rb +23 -3
  34. data/lib/radiomanager_client/api/presenter_api.rb +23 -3
  35. data/lib/radiomanager_client/api/program_api.rb +34 -14
  36. data/lib/radiomanager_client/api/station_api.rb +72 -0
  37. data/lib/radiomanager_client/api/story_api.rb +25 -5
  38. data/lib/radiomanager_client/api/tag_api.rb +20 -0
  39. data/lib/radiomanager_client/api/user_api.rb +20 -0
  40. data/lib/radiomanager_client/configuration.rb +1 -1
  41. data/lib/radiomanager_client/models/broadcast_epg_day.rb +204 -0
  42. data/lib/radiomanager_client/models/broadcast_epg_relations.rb +235 -0
  43. data/lib/radiomanager_client/models/broadcast_epg_result.rb +547 -0
  44. data/lib/radiomanager_client/models/epg_results.rb +223 -0
  45. data/lib/radiomanager_client/models/presenter_epg_result.rb +305 -0
  46. data/lib/radiomanager_client/models/station_result.rb +188 -0
  47. data/lib/radiomanager_client/models/station_result_station.rb +413 -0
  48. data/lib/radiomanager_client/models/story_data_input.rb +15 -4
  49. data/lib/radiomanager_client.rb +9 -3
  50. data/radiomanager_client.gemspec +1 -1
  51. data/spec/api/station_api_spec.rb +46 -0
  52. data/spec/configuration_spec.rb +3 -3
  53. data/spec/models/broadcast_epg_day_spec.rb +48 -0
  54. data/spec/models/broadcast_epg_relations_spec.rb +72 -0
  55. data/spec/models/broadcast_epg_result_spec.rb +238 -0
  56. data/spec/models/epg_results_spec.rb +54 -0
  57. data/spec/models/item_data_input_spec.rb +1 -1
  58. data/spec/models/item_input_only_spec.rb +1 -1
  59. data/spec/models/presenter_epg_result_spec.rb +102 -0
  60. data/spec/models/station_result_spec.rb +42 -0
  61. data/spec/models/station_result_station_spec.rb +186 -0
  62. metadata +34 -2
@@ -89,6 +89,9 @@ module RadioManagerClient
89
89
  # @option opts [Integer] :parent_id Search on Parent ID of Genre *(Optional)*
90
90
  # @option opts [Integer] :program_id Search on Program ID *(Optional)* `(Relation)`
91
91
  # @option opts [Integer] :broadcast_id Search on Broadcast ID *(Optional)* `(Relation)`
92
+ # @option opts [Integer] :limit Results per page *(Optional)*
93
+ # @option opts [String] :order_by Field to order the results *(Optional)*
94
+ # @option opts [String] :order_direction Direction of ordering *(Optional)*
92
95
  # @option opts [Integer] :_external_station_id Query on a different (content providing) station *(Optional)*
93
96
  # @return [GenreResults]
94
97
  def list_genres(opts = {})
@@ -103,6 +106,9 @@ module RadioManagerClient
103
106
  # @option opts [Integer] :parent_id Search on Parent ID of Genre *(Optional)*
104
107
  # @option opts [Integer] :program_id Search on Program ID *(Optional)* `(Relation)`
105
108
  # @option opts [Integer] :broadcast_id Search on Broadcast ID *(Optional)* `(Relation)`
109
+ # @option opts [Integer] :limit Results per page *(Optional)*
110
+ # @option opts [String] :order_by Field to order the results *(Optional)*
111
+ # @option opts [String] :order_direction Direction of ordering *(Optional)*
106
112
  # @option opts [Integer] :_external_station_id Query on a different (content providing) station *(Optional)*
107
113
  # @return [Array<(GenreResults, Fixnum, Hash)>] GenreResults data, response status code and response headers
108
114
  def list_genres_with_http_info(opts = {})
@@ -113,6 +119,17 @@ module RadioManagerClient
113
119
  fail ArgumentError, 'invalid value for "opts[:"page"]" when calling GenreApi.list_genres, must be greater than or equal to 0.'
114
120
  end
115
121
 
122
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 50
123
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling GenreApi.list_genres, must be smaller than or equal to 50.'
124
+ end
125
+
126
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
127
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling GenreApi.list_genres, must be greater than or equal to 1.'
128
+ end
129
+
130
+ if @api_client.config.client_side_validation && opts[:'order_direction'] && !['asc', 'desc'].include?(opts[:'order_direction'])
131
+ fail ArgumentError, 'invalid value for "order_direction", must be one of asc, desc'
132
+ end
116
133
  # resource path
117
134
  local_var_path = "/genres"
118
135
 
@@ -122,6 +139,9 @@ module RadioManagerClient
122
139
  query_params[:'parent_id'] = opts[:'parent_id'] if !opts[:'parent_id'].nil?
123
140
  query_params[:'program_id'] = opts[:'program_id'] if !opts[:'program_id'].nil?
124
141
  query_params[:'broadcast_id'] = opts[:'broadcast_id'] if !opts[:'broadcast_id'].nil?
142
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
143
+ query_params[:'order-by'] = opts[:'order_by'] if !opts[:'order_by'].nil?
144
+ query_params[:'order-direction'] = opts[:'order_direction'] if !opts[:'order_direction'].nil?
125
145
  query_params[:'_external_station_id'] = opts[:'_external_station_id'] if !opts[:'_external_station_id'].nil?
126
146
 
127
147
  # header parameters
@@ -298,23 +298,24 @@ module RadioManagerClient
298
298
  # 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.
299
299
  # @param [Hash] opts the optional parameters
300
300
  # @option opts [Integer] :page Current page *(Optional)*
301
- # @option opts [String] :order_by Field to order the results *(Optional)*
302
- # @option opts [String] :order_direction Direction of ordering *(Optional)*
303
- # @option opts [DateTime] :start_min Minimum start date *(Optional)*
304
- # @option opts [DateTime] :start_max Maximum start date *(Optional)*
305
- # @option opts [Integer] :duration_min Minimum duration (seconds) *(Optional)*
306
- # @option opts [Integer] :duration_max Maximum duration (seconds) *(Optional)*
307
- # @option opts [String] :status Play Status of item *(Optional)*
308
- # @option opts [Integer] :model_type_id Search on ModelType ID *(Optional)*
309
- # @option opts [Integer] :program_draft_id Search on Program Draft ID *(Optional)*
310
- # @option opts [Integer] :user_draft_id Search on User Draft ID *(Optional)*
311
- # @option opts [Integer] :station_draft_id Search on Station Draft ID *(Optional)*
312
301
  # @option opts [Integer] :block_id Search on Block ID *(Optional)* &#x60;(Relation)&#x60;
313
302
  # @option opts [Integer] :broadcast_id Search on Broadcast ID *(Optional)* &#x60;(Relation)&#x60;
303
+ # @option opts [Integer] :model_type_id Search on ModelType ID *(Optional)* &#x60;(Relation)&#x60;
304
+ # @option opts [Integer] :tag_id Search on Tag ID *(Optional)* &#x60;(Relation)&#x60;
314
305
  # @option opts [Integer] :campaign_id Search on Campaign ID *(Optional)* &#x60;(Relation)&#x60;
315
306
  # @option opts [Integer] :contact_id Search on Contact ID *(Optional)* &#x60;(Relation)&#x60;
307
+ # @option opts [Integer] :program_draft_id Search on Program Draft ID *(Optional)*
308
+ # @option opts [Integer] :user_draft_id Search on User Draft ID *(Optional)*
309
+ # @option opts [Integer] :station_draft_id Search on Station Draft ID *(Optional)*
316
310
  # @option opts [Integer] :program_id Search on Program ID *(Optional)* &#x60;(Relation)&#x60;
317
- # @option opts [Integer] :tag_id Search on Tag ID *(Optional)* &#x60;(Relation)&#x60;
311
+ # @option opts [DateTime] :start_min Minimum start date *(Optional)*
312
+ # @option opts [DateTime] :start_max Maximum start date *(Optional)*
313
+ # @option opts [Integer] :duration_min Minimum duration (seconds) *(Optional)*
314
+ # @option opts [Integer] :duration_max Maximum duration (seconds) *(Optional)*
315
+ # @option opts [String] :status Play Status of item *(Optional)*
316
+ # @option opts [Integer] :limit Results per page *(Optional)*
317
+ # @option opts [String] :order_by Field to order the results *(Optional)*
318
+ # @option opts [String] :order_direction Direction of ordering *(Optional)*
318
319
  # @option opts [Integer] :_external_station_id Query on a different (content providing) station *(Optional)*
319
320
  # @return [ItemResults]
320
321
  def list_items(opts = {})
@@ -326,23 +327,24 @@ module RadioManagerClient
326
327
  # 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.
327
328
  # @param [Hash] opts the optional parameters
328
329
  # @option opts [Integer] :page Current page *(Optional)*
329
- # @option opts [String] :order_by Field to order the results *(Optional)*
330
- # @option opts [String] :order_direction Direction of ordering *(Optional)*
331
- # @option opts [DateTime] :start_min Minimum start date *(Optional)*
332
- # @option opts [DateTime] :start_max Maximum start date *(Optional)*
333
- # @option opts [Integer] :duration_min Minimum duration (seconds) *(Optional)*
334
- # @option opts [Integer] :duration_max Maximum duration (seconds) *(Optional)*
335
- # @option opts [String] :status Play Status of item *(Optional)*
336
- # @option opts [Integer] :model_type_id Search on ModelType ID *(Optional)*
337
- # @option opts [Integer] :program_draft_id Search on Program Draft ID *(Optional)*
338
- # @option opts [Integer] :user_draft_id Search on User Draft ID *(Optional)*
339
- # @option opts [Integer] :station_draft_id Search on Station Draft ID *(Optional)*
340
330
  # @option opts [Integer] :block_id Search on Block ID *(Optional)* &#x60;(Relation)&#x60;
341
331
  # @option opts [Integer] :broadcast_id Search on Broadcast ID *(Optional)* &#x60;(Relation)&#x60;
332
+ # @option opts [Integer] :model_type_id Search on ModelType ID *(Optional)* &#x60;(Relation)&#x60;
333
+ # @option opts [Integer] :tag_id Search on Tag ID *(Optional)* &#x60;(Relation)&#x60;
342
334
  # @option opts [Integer] :campaign_id Search on Campaign ID *(Optional)* &#x60;(Relation)&#x60;
343
335
  # @option opts [Integer] :contact_id Search on Contact ID *(Optional)* &#x60;(Relation)&#x60;
336
+ # @option opts [Integer] :program_draft_id Search on Program Draft ID *(Optional)*
337
+ # @option opts [Integer] :user_draft_id Search on User Draft ID *(Optional)*
338
+ # @option opts [Integer] :station_draft_id Search on Station Draft ID *(Optional)*
344
339
  # @option opts [Integer] :program_id Search on Program ID *(Optional)* &#x60;(Relation)&#x60;
345
- # @option opts [Integer] :tag_id Search on Tag ID *(Optional)* &#x60;(Relation)&#x60;
340
+ # @option opts [DateTime] :start_min Minimum start date *(Optional)*
341
+ # @option opts [DateTime] :start_max Maximum start date *(Optional)*
342
+ # @option opts [Integer] :duration_min Minimum duration (seconds) *(Optional)*
343
+ # @option opts [Integer] :duration_max Maximum duration (seconds) *(Optional)*
344
+ # @option opts [String] :status Play Status of item *(Optional)*
345
+ # @option opts [Integer] :limit Results per page *(Optional)*
346
+ # @option opts [String] :order_by Field to order the results *(Optional)*
347
+ # @option opts [String] :order_direction Direction of ordering *(Optional)*
346
348
  # @option opts [Integer] :_external_station_id Query on a different (content providing) station *(Optional)*
347
349
  # @return [Array<(ItemResults, Fixnum, Hash)>] ItemResults data, response status code and response headers
348
350
  def list_items_with_http_info(opts = {})
@@ -353,35 +355,44 @@ module RadioManagerClient
353
355
  fail ArgumentError, 'invalid value for "opts[:"page"]" when calling ItemApi.list_items, must be greater than or equal to 1.'
354
356
  end
355
357
 
356
- if @api_client.config.client_side_validation && opts[:'order_direction'] && !['asc', 'desc'].include?(opts[:'order_direction'])
357
- fail ArgumentError, 'invalid value for "order_direction", must be one of asc, desc'
358
- end
359
358
  if @api_client.config.client_side_validation && opts[:'status'] && !['scheduled', 'playing', 'played'].include?(opts[:'status'])
360
359
  fail ArgumentError, 'invalid value for "status", must be one of scheduled, playing, played'
361
360
  end
361
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 50
362
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ItemApi.list_items, must be smaller than or equal to 50.'
363
+ end
364
+
365
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
366
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ItemApi.list_items, must be greater than or equal to 1.'
367
+ end
368
+
369
+ if @api_client.config.client_side_validation && opts[:'order_direction'] && !['asc', 'desc'].include?(opts[:'order_direction'])
370
+ fail ArgumentError, 'invalid value for "order_direction", must be one of asc, desc'
371
+ end
362
372
  # resource path
363
373
  local_var_path = "/items"
364
374
 
365
375
  # query parameters
366
376
  query_params = {}
367
377
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
368
- query_params[:'order-by'] = opts[:'order_by'] if !opts[:'order_by'].nil?
369
- query_params[:'order-direction'] = opts[:'order_direction'] if !opts[:'order_direction'].nil?
370
- query_params[:'start-min'] = opts[:'start_min'] if !opts[:'start_min'].nil?
371
- query_params[:'start-max'] = opts[:'start_max'] if !opts[:'start_max'].nil?
372
- query_params[:'duration-min'] = opts[:'duration_min'] if !opts[:'duration_min'].nil?
373
- query_params[:'duration-max'] = opts[:'duration_max'] if !opts[:'duration_max'].nil?
374
- query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
375
- query_params[:'model_type_id'] = opts[:'model_type_id'] if !opts[:'model_type_id'].nil?
376
- query_params[:'program_draft_id'] = opts[:'program_draft_id'] if !opts[:'program_draft_id'].nil?
377
- query_params[:'user_draft_id'] = opts[:'user_draft_id'] if !opts[:'user_draft_id'].nil?
378
- query_params[:'station_draft_id'] = opts[:'station_draft_id'] if !opts[:'station_draft_id'].nil?
379
378
  query_params[:'block_id'] = opts[:'block_id'] if !opts[:'block_id'].nil?
380
379
  query_params[:'broadcast_id'] = opts[:'broadcast_id'] if !opts[:'broadcast_id'].nil?
380
+ query_params[:'model_type_id'] = opts[:'model_type_id'] if !opts[:'model_type_id'].nil?
381
+ query_params[:'tag_id'] = opts[:'tag_id'] if !opts[:'tag_id'].nil?
381
382
  query_params[:'campaign_id'] = opts[:'campaign_id'] if !opts[:'campaign_id'].nil?
382
383
  query_params[:'contact_id'] = opts[:'contact_id'] if !opts[:'contact_id'].nil?
384
+ query_params[:'program_draft_id'] = opts[:'program_draft_id'] if !opts[:'program_draft_id'].nil?
385
+ query_params[:'user_draft_id'] = opts[:'user_draft_id'] if !opts[:'user_draft_id'].nil?
386
+ query_params[:'station_draft_id'] = opts[:'station_draft_id'] if !opts[:'station_draft_id'].nil?
383
387
  query_params[:'program_id'] = opts[:'program_id'] if !opts[:'program_id'].nil?
384
- query_params[:'tag_id'] = opts[:'tag_id'] if !opts[:'tag_id'].nil?
388
+ query_params[:'start-min'] = opts[:'start_min'] if !opts[:'start_min'].nil?
389
+ query_params[:'start-max'] = opts[:'start_max'] if !opts[:'start_max'].nil?
390
+ query_params[:'duration-min'] = opts[:'duration_min'] if !opts[:'duration_min'].nil?
391
+ query_params[:'duration-max'] = opts[:'duration_max'] if !opts[:'duration_max'].nil?
392
+ query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
393
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
394
+ query_params[:'order-by'] = opts[:'order_by'] if !opts[:'order_by'].nil?
395
+ query_params[:'order-direction'] = opts[:'order_direction'] if !opts[:'order_direction'].nil?
385
396
  query_params[:'_external_station_id'] = opts[:'_external_station_id'] if !opts[:'_external_station_id'].nil?
386
397
 
387
398
  # header parameters
@@ -86,13 +86,16 @@ module RadioManagerClient
86
86
  # List all modelTypes.
87
87
  # @param [Hash] opts the optional parameters
88
88
  # @option opts [Integer] :page Current page *(Optional)*
89
- # @option opts [String] :model
90
89
  # @option opts [Integer] :program_id Search on Program ID *(Optional)*
91
90
  # @option opts [Integer] :broadcast_id Search on Broadcast ID *(Optional)*
92
91
  # @option opts [Integer] :item_id Search on Item ID *(Optional)*
93
92
  # @option opts [Integer] :campaign_id Search on Campaign ID *(Optional)*
94
93
  # @option opts [Integer] :presenter_id Search on Presenter ID *(Optional)*
95
94
  # @option opts [Integer] :contact_id Search on Contact ID *(Optional)*
95
+ # @option opts [String] :model Search Modeltypes for certain Model *(Optional)*
96
+ # @option opts [Integer] :limit Results per page *(Optional)*
97
+ # @option opts [String] :order_by Field to order the results *(Optional)*
98
+ # @option opts [String] :order_direction Direction of ordering *(Optional)*
96
99
  # @option opts [Integer] :_external_station_id Query on a different (content providing) station *(Optional)*
97
100
  # @return [ModelTypeResults]
98
101
  def list_model_types(opts = {})
@@ -104,13 +107,16 @@ module RadioManagerClient
104
107
  # List all modelTypes.
105
108
  # @param [Hash] opts the optional parameters
106
109
  # @option opts [Integer] :page Current page *(Optional)*
107
- # @option opts [String] :model
108
110
  # @option opts [Integer] :program_id Search on Program ID *(Optional)*
109
111
  # @option opts [Integer] :broadcast_id Search on Broadcast ID *(Optional)*
110
112
  # @option opts [Integer] :item_id Search on Item ID *(Optional)*
111
113
  # @option opts [Integer] :campaign_id Search on Campaign ID *(Optional)*
112
114
  # @option opts [Integer] :presenter_id Search on Presenter ID *(Optional)*
113
115
  # @option opts [Integer] :contact_id Search on Contact ID *(Optional)*
116
+ # @option opts [String] :model Search Modeltypes for certain Model *(Optional)*
117
+ # @option opts [Integer] :limit Results per page *(Optional)*
118
+ # @option opts [String] :order_by Field to order the results *(Optional)*
119
+ # @option opts [String] :order_direction Direction of ordering *(Optional)*
114
120
  # @option opts [Integer] :_external_station_id Query on a different (content providing) station *(Optional)*
115
121
  # @return [Array<(ModelTypeResults, Fixnum, Hash)>] ModelTypeResults data, response status code and response headers
116
122
  def list_model_types_with_http_info(opts = {})
@@ -124,19 +130,33 @@ module RadioManagerClient
124
130
  if @api_client.config.client_side_validation && opts[:'model'] && !['broadcast', 'program', 'item', 'campaign', 'presenter', 'contact', 'external'].include?(opts[:'model'])
125
131
  fail ArgumentError, 'invalid value for "model", must be one of broadcast, program, item, campaign, presenter, contact, external'
126
132
  end
133
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 50
134
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ModelTypeApi.list_model_types, must be smaller than or equal to 50.'
135
+ end
136
+
137
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
138
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ModelTypeApi.list_model_types, must be greater than or equal to 1.'
139
+ end
140
+
141
+ if @api_client.config.client_side_validation && opts[:'order_direction'] && !['asc', 'desc'].include?(opts[:'order_direction'])
142
+ fail ArgumentError, 'invalid value for "order_direction", must be one of asc, desc'
143
+ end
127
144
  # resource path
128
145
  local_var_path = "/model_types"
129
146
 
130
147
  # query parameters
131
148
  query_params = {}
132
149
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
133
- query_params[:'model'] = opts[:'model'] if !opts[:'model'].nil?
134
150
  query_params[:'program_id'] = opts[:'program_id'] if !opts[:'program_id'].nil?
135
151
  query_params[:'broadcast_id'] = opts[:'broadcast_id'] if !opts[:'broadcast_id'].nil?
136
152
  query_params[:'item_id'] = opts[:'item_id'] if !opts[:'item_id'].nil?
137
153
  query_params[:'campaign_id'] = opts[:'campaign_id'] if !opts[:'campaign_id'].nil?
138
154
  query_params[:'presenter_id'] = opts[:'presenter_id'] if !opts[:'presenter_id'].nil?
139
155
  query_params[:'contact_id'] = opts[:'contact_id'] if !opts[:'contact_id'].nil?
156
+ query_params[:'model'] = opts[:'model'] if !opts[:'model'].nil?
157
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
158
+ query_params[:'order-by'] = opts[:'order_by'] if !opts[:'order_by'].nil?
159
+ query_params[:'order-direction'] = opts[:'order_direction'] if !opts[:'order_direction'].nil?
140
160
  query_params[:'_external_station_id'] = opts[:'_external_station_id'] if !opts[:'_external_station_id'].nil?
141
161
 
142
162
  # header parameters
@@ -200,9 +200,12 @@ module RadioManagerClient
200
200
  # List all presenters.
201
201
  # @param [Hash] opts the optional parameters
202
202
  # @option opts [Integer] :page Current page *(Optional)*
203
- # @option opts [Integer] :model_type_id Search on ModelType ID (Optional)
204
203
  # @option opts [Integer] :program_id Search on Program ID *(Optional)* &#x60;(Relation)&#x60;
205
204
  # @option opts [Integer] :broadcast_id Search on Broadcast ID *(Optional)* &#x60;(Relation)&#x60;
205
+ # @option opts [Integer] :model_type_id Search on ModelType ID (Optional)
206
+ # @option opts [Integer] :limit Results per page *(Optional)*
207
+ # @option opts [String] :order_by Field to order the results *(Optional)*
208
+ # @option opts [String] :order_direction Direction of ordering *(Optional)*
206
209
  # @option opts [Integer] :_external_station_id Query on a different (content providing) station *(Optional)*
207
210
  # @return [PresenterResults]
208
211
  def list_presenters(opts = {})
@@ -214,9 +217,12 @@ module RadioManagerClient
214
217
  # List all presenters.
215
218
  # @param [Hash] opts the optional parameters
216
219
  # @option opts [Integer] :page Current page *(Optional)*
217
- # @option opts [Integer] :model_type_id Search on ModelType ID (Optional)
218
220
  # @option opts [Integer] :program_id Search on Program ID *(Optional)* &#x60;(Relation)&#x60;
219
221
  # @option opts [Integer] :broadcast_id Search on Broadcast ID *(Optional)* &#x60;(Relation)&#x60;
222
+ # @option opts [Integer] :model_type_id Search on ModelType ID (Optional)
223
+ # @option opts [Integer] :limit Results per page *(Optional)*
224
+ # @option opts [String] :order_by Field to order the results *(Optional)*
225
+ # @option opts [String] :order_direction Direction of ordering *(Optional)*
220
226
  # @option opts [Integer] :_external_station_id Query on a different (content providing) station *(Optional)*
221
227
  # @return [Array<(PresenterResults, Fixnum, Hash)>] PresenterResults data, response status code and response headers
222
228
  def list_presenters_with_http_info(opts = {})
@@ -227,15 +233,29 @@ module RadioManagerClient
227
233
  fail ArgumentError, 'invalid value for "opts[:"page"]" when calling PresenterApi.list_presenters, must be greater than or equal to 0.'
228
234
  end
229
235
 
236
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 50
237
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling PresenterApi.list_presenters, must be smaller than or equal to 50.'
238
+ end
239
+
240
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
241
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling PresenterApi.list_presenters, must be greater than or equal to 1.'
242
+ end
243
+
244
+ if @api_client.config.client_side_validation && opts[:'order_direction'] && !['asc', 'desc'].include?(opts[:'order_direction'])
245
+ fail ArgumentError, 'invalid value for "order_direction", must be one of asc, desc'
246
+ end
230
247
  # resource path
231
248
  local_var_path = "/presenters"
232
249
 
233
250
  # query parameters
234
251
  query_params = {}
235
252
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
236
- query_params[:'model_type_id'] = opts[:'model_type_id'] if !opts[:'model_type_id'].nil?
237
253
  query_params[:'program_id'] = opts[:'program_id'] if !opts[:'program_id'].nil?
238
254
  query_params[:'broadcast_id'] = opts[:'broadcast_id'] if !opts[:'broadcast_id'].nil?
255
+ query_params[:'model_type_id'] = opts[:'model_type_id'] if !opts[:'model_type_id'].nil?
256
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
257
+ query_params[:'order-by'] = opts[:'order_by'] if !opts[:'order_by'].nil?
258
+ query_params[:'order-direction'] = opts[:'order_direction'] if !opts[:'order_direction'].nil?
239
259
  query_params[:'_external_station_id'] = opts[:'_external_station_id'] if !opts[:'_external_station_id'].nil?
240
260
 
241
261
  # header parameters
@@ -200,13 +200,16 @@ module RadioManagerClient
200
200
  # List all programs.
201
201
  # @param [Hash] opts the optional parameters
202
202
  # @option opts [Integer] :page Current page *(Optional)*
203
- # @option opts [Integer] :genre_id Search on Genre ID *(Optional)*
204
- # @option opts [Integer] :model_type_id Search on ModelType ID *(Optional)*
205
- # @option opts [Integer] :presenter_id Search on Presenter ID *(Optional)* &#x60;(Relation)&#x60;
206
- # @option opts [Integer] :tag_id Search on Tag ID *(Optional)* &#x60;(Relation)&#x60;
207
203
  # @option opts [Integer] :broadcast_id Search on Broadcast ID *(Optional)* &#x60;(Relation)&#x60;
208
- # @option opts [Integer] :item_id Search on Item ID *(Optional)* &#x60;(Relation)&#x60;
204
+ # @option opts [Integer] :model_type_id Search on ModelType ID *(Optional)* &#x60;(Relation)&#x60;
205
+ # @option opts [Integer] :tag_id Search on Tag ID *(Optional)* &#x60;(Relation)&#x60;
206
+ # @option opts [Integer] :presenter_id Search on Presenter ID *(Optional)* &#x60;(Relation)&#x60;
207
+ # @option opts [Integer] :genre_id Search on Genre ID *(Optional)*
209
208
  # @option opts [Integer] :block_id Search on Block ID *(Optional)* &#x60;(Relation)&#x60;
209
+ # @option opts [Integer] :item_id Search on Item ID *(Optional)* &#x60;(Relation)&#x60;
210
+ # @option opts [Integer] :limit Results per page *(Optional)*
211
+ # @option opts [String] :order_by Field to order the results *(Optional)*
212
+ # @option opts [String] :order_direction Direction of ordering *(Optional)*
210
213
  # @option opts [Integer] :_external_station_id Query on a different (content providing) station *(Optional)*
211
214
  # @return [ProgramResults]
212
215
  def list_programs(opts = {})
@@ -218,13 +221,16 @@ module RadioManagerClient
218
221
  # List all programs.
219
222
  # @param [Hash] opts the optional parameters
220
223
  # @option opts [Integer] :page Current page *(Optional)*
221
- # @option opts [Integer] :genre_id Search on Genre ID *(Optional)*
222
- # @option opts [Integer] :model_type_id Search on ModelType ID *(Optional)*
223
- # @option opts [Integer] :presenter_id Search on Presenter ID *(Optional)* &#x60;(Relation)&#x60;
224
- # @option opts [Integer] :tag_id Search on Tag ID *(Optional)* &#x60;(Relation)&#x60;
225
224
  # @option opts [Integer] :broadcast_id Search on Broadcast ID *(Optional)* &#x60;(Relation)&#x60;
226
- # @option opts [Integer] :item_id Search on Item ID *(Optional)* &#x60;(Relation)&#x60;
225
+ # @option opts [Integer] :model_type_id Search on ModelType ID *(Optional)* &#x60;(Relation)&#x60;
226
+ # @option opts [Integer] :tag_id Search on Tag ID *(Optional)* &#x60;(Relation)&#x60;
227
+ # @option opts [Integer] :presenter_id Search on Presenter ID *(Optional)* &#x60;(Relation)&#x60;
228
+ # @option opts [Integer] :genre_id Search on Genre ID *(Optional)*
227
229
  # @option opts [Integer] :block_id Search on Block ID *(Optional)* &#x60;(Relation)&#x60;
230
+ # @option opts [Integer] :item_id Search on Item ID *(Optional)* &#x60;(Relation)&#x60;
231
+ # @option opts [Integer] :limit Results per page *(Optional)*
232
+ # @option opts [String] :order_by Field to order the results *(Optional)*
233
+ # @option opts [String] :order_direction Direction of ordering *(Optional)*
228
234
  # @option opts [Integer] :_external_station_id Query on a different (content providing) station *(Optional)*
229
235
  # @return [Array<(ProgramResults, Fixnum, Hash)>] ProgramResults data, response status code and response headers
230
236
  def list_programs_with_http_info(opts = {})
@@ -235,19 +241,33 @@ module RadioManagerClient
235
241
  fail ArgumentError, 'invalid value for "opts[:"page"]" when calling ProgramApi.list_programs, must be greater than or equal to 0.'
236
242
  end
237
243
 
244
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 50
245
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ProgramApi.list_programs, must be smaller than or equal to 50.'
246
+ end
247
+
248
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
249
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ProgramApi.list_programs, must be greater than or equal to 1.'
250
+ end
251
+
252
+ if @api_client.config.client_side_validation && opts[:'order_direction'] && !['asc', 'desc'].include?(opts[:'order_direction'])
253
+ fail ArgumentError, 'invalid value for "order_direction", must be one of asc, desc'
254
+ end
238
255
  # resource path
239
256
  local_var_path = "/programs"
240
257
 
241
258
  # query parameters
242
259
  query_params = {}
243
260
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
244
- query_params[:'genre_id'] = opts[:'genre_id'] if !opts[:'genre_id'].nil?
261
+ query_params[:'broadcast_id'] = opts[:'broadcast_id'] if !opts[:'broadcast_id'].nil?
245
262
  query_params[:'model_type_id'] = opts[:'model_type_id'] if !opts[:'model_type_id'].nil?
246
- query_params[:'presenter_id'] = opts[:'presenter_id'] if !opts[:'presenter_id'].nil?
247
263
  query_params[:'tag_id'] = opts[:'tag_id'] if !opts[:'tag_id'].nil?
248
- query_params[:'broadcast_id'] = opts[:'broadcast_id'] if !opts[:'broadcast_id'].nil?
249
- query_params[:'item_id'] = opts[:'item_id'] if !opts[:'item_id'].nil?
264
+ query_params[:'presenter_id'] = opts[:'presenter_id'] if !opts[:'presenter_id'].nil?
265
+ query_params[:'genre_id'] = opts[:'genre_id'] if !opts[:'genre_id'].nil?
250
266
  query_params[:'block_id'] = opts[:'block_id'] if !opts[:'block_id'].nil?
267
+ query_params[:'item_id'] = opts[:'item_id'] if !opts[:'item_id'].nil?
268
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
269
+ query_params[:'order-by'] = opts[:'order_by'] if !opts[:'order_by'].nil?
270
+ query_params[:'order-direction'] = opts[:'order_direction'] if !opts[:'order_direction'].nil?
251
271
  query_params[:'_external_station_id'] = opts[:'_external_station_id'] if !opts[:'_external_station_id'].nil?
252
272
 
253
273
  # header parameters
@@ -0,0 +1,72 @@
1
+ =begin
2
+ #RadioManager
3
+
4
+ #RadioManager
5
+
6
+ OpenAPI spec version: 2.0
7
+ Contact: support@pluxbox.com
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.2.3
10
+
11
+ =end
12
+
13
+ require "uri"
14
+
15
+ module RadioManagerClient
16
+ class StationApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+
23
+ # Get own station only
24
+ # Get own station only
25
+ # @param [Hash] opts the optional parameters
26
+ # @return [StationResult]
27
+ def get_station(opts = {})
28
+ data, _status_code, _headers = get_station_with_http_info(opts)
29
+ return data
30
+ end
31
+
32
+ # Get own station only
33
+ # Get own station only
34
+ # @param [Hash] opts the optional parameters
35
+ # @return [Array<(StationResult, Fixnum, Hash)>] StationResult data, response status code and response headers
36
+ def get_station_with_http_info(opts = {})
37
+ if @api_client.config.debugging
38
+ @api_client.config.logger.debug "Calling API: StationApi.get_station ..."
39
+ end
40
+ # resource path
41
+ local_var_path = "/station"
42
+
43
+ # query parameters
44
+ query_params = {}
45
+
46
+ # header parameters
47
+ header_params = {}
48
+ # HTTP header 'Accept' (if needed)
49
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
50
+ # HTTP header 'Content-Type'
51
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
52
+
53
+ # form parameters
54
+ form_params = {}
55
+
56
+ # http body (model)
57
+ post_body = nil
58
+ auth_names = ['API Key']
59
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
60
+ :header_params => header_params,
61
+ :query_params => query_params,
62
+ :form_params => form_params,
63
+ :body => post_body,
64
+ :auth_names => auth_names,
65
+ :return_type => 'StationResult')
66
+ if @api_client.config.debugging
67
+ @api_client.config.logger.debug "API called: StationApi#get_station\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
68
+ end
69
+ return data, status_code, headers
70
+ end
71
+ end
72
+ end