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
@@ -0,0 +1,188 @@
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 'date'
14
+
15
+ module RadioManagerClient
16
+
17
+ class StationResult
18
+ attr_accessor :station
19
+
20
+
21
+ # Attribute mapping from ruby-style variable name to JSON key.
22
+ def self.attribute_map
23
+ {
24
+ :'station' => :'station'
25
+ }
26
+ end
27
+
28
+ # Attribute type mapping.
29
+ def self.swagger_types
30
+ {
31
+ :'station' => :'StationResultStation'
32
+ }
33
+ end
34
+
35
+ # Initializes the object
36
+ # @param [Hash] attributes Model attributes in the form of hash
37
+ def initialize(attributes = {})
38
+ return unless attributes.is_a?(Hash)
39
+
40
+ # convert string to symbol for hash key
41
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
42
+
43
+ if attributes.has_key?(:'station')
44
+ self.station = attributes[:'station']
45
+ end
46
+
47
+ end
48
+
49
+ # Show invalid properties with the reasons. Usually used together with valid?
50
+ # @return Array for valid properies with the reasons
51
+ def list_invalid_properties
52
+ invalid_properties = Array.new
53
+ return invalid_properties
54
+ end
55
+
56
+ # Check to see if the all the properties in the model are valid
57
+ # @return true if the model is valid
58
+ def valid?
59
+ return true
60
+ end
61
+
62
+ # Checks equality by comparing each attribute.
63
+ # @param [Object] Object to be compared
64
+ def ==(o)
65
+ return true if self.equal?(o)
66
+ self.class == o.class &&
67
+ station == o.station
68
+ end
69
+
70
+ # @see the `==` method
71
+ # @param [Object] Object to be compared
72
+ def eql?(o)
73
+ self == o
74
+ end
75
+
76
+ # Calculates hash code according to all attributes.
77
+ # @return [Fixnum] Hash code
78
+ def hash
79
+ [station].hash
80
+ end
81
+
82
+ # Builds the object from hash
83
+ # @param [Hash] attributes Model attributes in the form of hash
84
+ # @return [Object] Returns the model itself
85
+ def build_from_hash(attributes)
86
+ return nil unless attributes.is_a?(Hash)
87
+ self.class.swagger_types.each_pair do |key, type|
88
+ if type =~ /\AArray<(.*)>/i
89
+ # check to ensure the input is an array given that the the attribute
90
+ # is documented as an array but the input is not
91
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
92
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
93
+ end
94
+ elsif !attributes[self.class.attribute_map[key]].nil?
95
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
96
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
97
+ end
98
+
99
+ self
100
+ end
101
+
102
+ # Deserializes the data based on type
103
+ # @param string type Data type
104
+ # @param string value Value to be deserialized
105
+ # @return [Object] Deserialized data
106
+ def _deserialize(type, value)
107
+ case type.to_sym
108
+ when :DateTime
109
+ DateTime.parse(value)
110
+ when :Date
111
+ Date.parse(value)
112
+ when :String
113
+ value.to_s
114
+ when :Integer
115
+ value.to_i
116
+ when :Float
117
+ value.to_f
118
+ when :BOOLEAN
119
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
120
+ true
121
+ else
122
+ false
123
+ end
124
+ when :Object
125
+ # generic object (usually a Hash), return directly
126
+ value
127
+ when /\AArray<(?<inner_type>.+)>\z/
128
+ inner_type = Regexp.last_match[:inner_type]
129
+ value.map { |v| _deserialize(inner_type, v) }
130
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
131
+ k_type = Regexp.last_match[:k_type]
132
+ v_type = Regexp.last_match[:v_type]
133
+ {}.tap do |hash|
134
+ value.each do |k, v|
135
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
136
+ end
137
+ end
138
+ else # model
139
+ temp_model = RadioManagerClient.const_get(type).new
140
+ temp_model.build_from_hash(value)
141
+ end
142
+ end
143
+
144
+ # Returns the string representation of the object
145
+ # @return [String] String presentation of the object
146
+ def to_s
147
+ to_hash.to_s
148
+ end
149
+
150
+ # to_body is an alias to to_hash (backward compatibility)
151
+ # @return [Hash] Returns the object in the form of hash
152
+ def to_body
153
+ to_hash
154
+ end
155
+
156
+ # Returns the object in the form of hash
157
+ # @return [Hash] Returns the object in the form of hash
158
+ def to_hash
159
+ hash = {}
160
+ self.class.attribute_map.each_pair do |attr, param|
161
+ value = self.send(attr)
162
+ next if value.nil?
163
+ hash[param] = _to_hash(value)
164
+ end
165
+ hash
166
+ end
167
+
168
+ # Outputs non-array value in the form of hash
169
+ # For object, use to_hash. Otherwise, just return the value
170
+ # @param [Object] value Any valid value
171
+ # @return [Hash] Returns the value in the form of hash
172
+ def _to_hash(value)
173
+ if value.is_a?(Array)
174
+ value.compact.map{ |v| _to_hash(v) }
175
+ elsif value.is_a?(Hash)
176
+ {}.tap do |hash|
177
+ value.each { |k, v| hash[k] = _to_hash(v) }
178
+ end
179
+ elsif value.respond_to? :to_hash
180
+ value.to_hash
181
+ else
182
+ value
183
+ end
184
+ end
185
+
186
+ end
187
+
188
+ end
@@ -0,0 +1,413 @@
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 'date'
14
+
15
+ module RadioManagerClient
16
+
17
+ class StationResultStation
18
+ attr_accessor :id
19
+
20
+ attr_accessor :name
21
+
22
+ attr_accessor :created_at
23
+
24
+ attr_accessor :updated_at
25
+
26
+ attr_accessor :system_name
27
+
28
+ attr_accessor :short_name
29
+
30
+ attr_accessor :medium_name
31
+
32
+ attr_accessor :website
33
+
34
+ attr_accessor :email
35
+
36
+ attr_accessor :keywords
37
+
38
+ attr_accessor :description
39
+
40
+ attr_accessor :sms
41
+
42
+ attr_accessor :telephone
43
+
44
+ attr_accessor :genre_id
45
+
46
+ attr_accessor :language
47
+
48
+ attr_accessor :active
49
+
50
+ attr_accessor :logo_rectangle
51
+
52
+ attr_accessor :logo_128x128
53
+
54
+ attr_accessor :logo_320x320
55
+
56
+ attr_accessor :logo_600x600
57
+
58
+ attr_accessor :pay_off
59
+
60
+ attr_accessor :pty_code
61
+
62
+ attr_accessor :pty_type
63
+
64
+ attr_accessor :station_key
65
+
66
+ attr_accessor :timezone
67
+
68
+ attr_accessor :trial_date
69
+
70
+
71
+ # Attribute mapping from ruby-style variable name to JSON key.
72
+ def self.attribute_map
73
+ {
74
+ :'id' => :'id',
75
+ :'name' => :'name',
76
+ :'created_at' => :'created_at',
77
+ :'updated_at' => :'updated_at',
78
+ :'system_name' => :'system_name',
79
+ :'short_name' => :'short_name',
80
+ :'medium_name' => :'medium_name',
81
+ :'website' => :'website',
82
+ :'email' => :'email',
83
+ :'keywords' => :'keywords',
84
+ :'description' => :'description',
85
+ :'sms' => :'sms',
86
+ :'telephone' => :'telephone',
87
+ :'genre_id' => :'genre_id',
88
+ :'language' => :'language',
89
+ :'active' => :'active',
90
+ :'logo_rectangle' => :'logo_rectangle',
91
+ :'logo_128x128' => :'logo_128x128',
92
+ :'logo_320x320' => :'logo_320x320',
93
+ :'logo_600x600' => :'logo_600x600',
94
+ :'pay_off' => :'pay_off',
95
+ :'pty_code' => :'pty_code',
96
+ :'pty_type' => :'pty_type',
97
+ :'station_key' => :'station_key',
98
+ :'timezone' => :'timezone',
99
+ :'trial_date' => :'trial_date'
100
+ }
101
+ end
102
+
103
+ # Attribute type mapping.
104
+ def self.swagger_types
105
+ {
106
+ :'id' => :'Integer',
107
+ :'name' => :'String',
108
+ :'created_at' => :'DateTime',
109
+ :'updated_at' => :'DateTime',
110
+ :'system_name' => :'String',
111
+ :'short_name' => :'String',
112
+ :'medium_name' => :'String',
113
+ :'website' => :'String',
114
+ :'email' => :'String',
115
+ :'keywords' => :'String',
116
+ :'description' => :'String',
117
+ :'sms' => :'String',
118
+ :'telephone' => :'String',
119
+ :'genre_id' => :'Integer',
120
+ :'language' => :'String',
121
+ :'active' => :'BOOLEAN',
122
+ :'logo_rectangle' => :'String',
123
+ :'logo_128x128' => :'String',
124
+ :'logo_320x320' => :'String',
125
+ :'logo_600x600' => :'String',
126
+ :'pay_off' => :'String',
127
+ :'pty_code' => :'Integer',
128
+ :'pty_type' => :'String',
129
+ :'station_key' => :'String',
130
+ :'timezone' => :'String',
131
+ :'trial_date' => :'DateTime'
132
+ }
133
+ end
134
+
135
+ # Initializes the object
136
+ # @param [Hash] attributes Model attributes in the form of hash
137
+ def initialize(attributes = {})
138
+ return unless attributes.is_a?(Hash)
139
+
140
+ # convert string to symbol for hash key
141
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
142
+
143
+ if attributes.has_key?(:'id')
144
+ self.id = attributes[:'id']
145
+ end
146
+
147
+ if attributes.has_key?(:'name')
148
+ self.name = attributes[:'name']
149
+ end
150
+
151
+ if attributes.has_key?(:'created_at')
152
+ self.created_at = attributes[:'created_at']
153
+ end
154
+
155
+ if attributes.has_key?(:'updated_at')
156
+ self.updated_at = attributes[:'updated_at']
157
+ end
158
+
159
+ if attributes.has_key?(:'system_name')
160
+ self.system_name = attributes[:'system_name']
161
+ end
162
+
163
+ if attributes.has_key?(:'short_name')
164
+ self.short_name = attributes[:'short_name']
165
+ end
166
+
167
+ if attributes.has_key?(:'medium_name')
168
+ self.medium_name = attributes[:'medium_name']
169
+ end
170
+
171
+ if attributes.has_key?(:'website')
172
+ self.website = attributes[:'website']
173
+ end
174
+
175
+ if attributes.has_key?(:'email')
176
+ self.email = attributes[:'email']
177
+ end
178
+
179
+ if attributes.has_key?(:'keywords')
180
+ self.keywords = attributes[:'keywords']
181
+ end
182
+
183
+ if attributes.has_key?(:'description')
184
+ self.description = attributes[:'description']
185
+ end
186
+
187
+ if attributes.has_key?(:'sms')
188
+ self.sms = attributes[:'sms']
189
+ end
190
+
191
+ if attributes.has_key?(:'telephone')
192
+ self.telephone = attributes[:'telephone']
193
+ end
194
+
195
+ if attributes.has_key?(:'genre_id')
196
+ self.genre_id = attributes[:'genre_id']
197
+ end
198
+
199
+ if attributes.has_key?(:'language')
200
+ self.language = attributes[:'language']
201
+ end
202
+
203
+ if attributes.has_key?(:'active')
204
+ self.active = attributes[:'active']
205
+ end
206
+
207
+ if attributes.has_key?(:'logo_rectangle')
208
+ self.logo_rectangle = attributes[:'logo_rectangle']
209
+ end
210
+
211
+ if attributes.has_key?(:'logo_128x128')
212
+ self.logo_128x128 = attributes[:'logo_128x128']
213
+ end
214
+
215
+ if attributes.has_key?(:'logo_320x320')
216
+ self.logo_320x320 = attributes[:'logo_320x320']
217
+ end
218
+
219
+ if attributes.has_key?(:'logo_600x600')
220
+ self.logo_600x600 = attributes[:'logo_600x600']
221
+ end
222
+
223
+ if attributes.has_key?(:'pay_off')
224
+ self.pay_off = attributes[:'pay_off']
225
+ end
226
+
227
+ if attributes.has_key?(:'pty_code')
228
+ self.pty_code = attributes[:'pty_code']
229
+ end
230
+
231
+ if attributes.has_key?(:'pty_type')
232
+ self.pty_type = attributes[:'pty_type']
233
+ end
234
+
235
+ if attributes.has_key?(:'station_key')
236
+ self.station_key = attributes[:'station_key']
237
+ end
238
+
239
+ if attributes.has_key?(:'timezone')
240
+ self.timezone = attributes[:'timezone']
241
+ end
242
+
243
+ if attributes.has_key?(:'trial_date')
244
+ self.trial_date = attributes[:'trial_date']
245
+ end
246
+
247
+ end
248
+
249
+ # Show invalid properties with the reasons. Usually used together with valid?
250
+ # @return Array for valid properies with the reasons
251
+ def list_invalid_properties
252
+ invalid_properties = Array.new
253
+ return invalid_properties
254
+ end
255
+
256
+ # Check to see if the all the properties in the model are valid
257
+ # @return true if the model is valid
258
+ def valid?
259
+ return true
260
+ end
261
+
262
+ # Checks equality by comparing each attribute.
263
+ # @param [Object] Object to be compared
264
+ def ==(o)
265
+ return true if self.equal?(o)
266
+ self.class == o.class &&
267
+ id == o.id &&
268
+ name == o.name &&
269
+ created_at == o.created_at &&
270
+ updated_at == o.updated_at &&
271
+ system_name == o.system_name &&
272
+ short_name == o.short_name &&
273
+ medium_name == o.medium_name &&
274
+ website == o.website &&
275
+ email == o.email &&
276
+ keywords == o.keywords &&
277
+ description == o.description &&
278
+ sms == o.sms &&
279
+ telephone == o.telephone &&
280
+ genre_id == o.genre_id &&
281
+ language == o.language &&
282
+ active == o.active &&
283
+ logo_rectangle == o.logo_rectangle &&
284
+ logo_128x128 == o.logo_128x128 &&
285
+ logo_320x320 == o.logo_320x320 &&
286
+ logo_600x600 == o.logo_600x600 &&
287
+ pay_off == o.pay_off &&
288
+ pty_code == o.pty_code &&
289
+ pty_type == o.pty_type &&
290
+ station_key == o.station_key &&
291
+ timezone == o.timezone &&
292
+ trial_date == o.trial_date
293
+ end
294
+
295
+ # @see the `==` method
296
+ # @param [Object] Object to be compared
297
+ def eql?(o)
298
+ self == o
299
+ end
300
+
301
+ # Calculates hash code according to all attributes.
302
+ # @return [Fixnum] Hash code
303
+ def hash
304
+ [id, name, created_at, updated_at, system_name, short_name, medium_name, website, email, keywords, description, sms, telephone, genre_id, language, active, logo_rectangle, logo_128x128, logo_320x320, logo_600x600, pay_off, pty_code, pty_type, station_key, timezone, trial_date].hash
305
+ end
306
+
307
+ # Builds the object from hash
308
+ # @param [Hash] attributes Model attributes in the form of hash
309
+ # @return [Object] Returns the model itself
310
+ def build_from_hash(attributes)
311
+ return nil unless attributes.is_a?(Hash)
312
+ self.class.swagger_types.each_pair do |key, type|
313
+ if type =~ /\AArray<(.*)>/i
314
+ # check to ensure the input is an array given that the the attribute
315
+ # is documented as an array but the input is not
316
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
317
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
318
+ end
319
+ elsif !attributes[self.class.attribute_map[key]].nil?
320
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
321
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
322
+ end
323
+
324
+ self
325
+ end
326
+
327
+ # Deserializes the data based on type
328
+ # @param string type Data type
329
+ # @param string value Value to be deserialized
330
+ # @return [Object] Deserialized data
331
+ def _deserialize(type, value)
332
+ case type.to_sym
333
+ when :DateTime
334
+ DateTime.parse(value)
335
+ when :Date
336
+ Date.parse(value)
337
+ when :String
338
+ value.to_s
339
+ when :Integer
340
+ value.to_i
341
+ when :Float
342
+ value.to_f
343
+ when :BOOLEAN
344
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
345
+ true
346
+ else
347
+ false
348
+ end
349
+ when :Object
350
+ # generic object (usually a Hash), return directly
351
+ value
352
+ when /\AArray<(?<inner_type>.+)>\z/
353
+ inner_type = Regexp.last_match[:inner_type]
354
+ value.map { |v| _deserialize(inner_type, v) }
355
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
356
+ k_type = Regexp.last_match[:k_type]
357
+ v_type = Regexp.last_match[:v_type]
358
+ {}.tap do |hash|
359
+ value.each do |k, v|
360
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
361
+ end
362
+ end
363
+ else # model
364
+ temp_model = RadioManagerClient.const_get(type).new
365
+ temp_model.build_from_hash(value)
366
+ end
367
+ end
368
+
369
+ # Returns the string representation of the object
370
+ # @return [String] String presentation of the object
371
+ def to_s
372
+ to_hash.to_s
373
+ end
374
+
375
+ # to_body is an alias to to_hash (backward compatibility)
376
+ # @return [Hash] Returns the object in the form of hash
377
+ def to_body
378
+ to_hash
379
+ end
380
+
381
+ # Returns the object in the form of hash
382
+ # @return [Hash] Returns the object in the form of hash
383
+ def to_hash
384
+ hash = {}
385
+ self.class.attribute_map.each_pair do |attr, param|
386
+ value = self.send(attr)
387
+ next if value.nil?
388
+ hash[param] = _to_hash(value)
389
+ end
390
+ hash
391
+ end
392
+
393
+ # Outputs non-array value in the form of hash
394
+ # For object, use to_hash. Otherwise, just return the value
395
+ # @param [Object] value Any valid value
396
+ # @return [Hash] Returns the value in the form of hash
397
+ def _to_hash(value)
398
+ if value.is_a?(Array)
399
+ value.compact.map{ |v| _to_hash(v) }
400
+ elsif value.is_a?(Hash)
401
+ {}.tap do |hash|
402
+ value.each { |k, v| hash[k] = _to_hash(v) }
403
+ end
404
+ elsif value.respond_to? :to_hash
405
+ value.to_hash
406
+ else
407
+ value
408
+ end
409
+ end
410
+
411
+ end
412
+
413
+ end