songtradr_api_client_ruby 1.12.23 → 1.13.0
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.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/README.md +6 -5
- data/docs/AllowedValuesApi.md +2 -2
- data/docs/ApiKeyDTO.md +2 -2
- data/docs/CategoryMediumDTO.md +3 -3
- data/docs/FileSmallDTO.md +3 -3
- data/docs/MusicalFeaturesDTO.md +38 -38
- data/docs/PlaylistLargeDTO.md +2 -2
- data/docs/ProductMediumDTO.md +4 -4
- data/docs/RecordingApi.md +6 -0
- data/docs/RecordingLargeDTO.md +5 -5
- data/docs/RecordingMediumDTO.md +5 -3
- data/docs/RecordingMinimalWithMusicalFeaturesDTO.md +3 -3
- data/docs/RecordingSmallDTO.md +3 -3
- data/docs/TrackDTO.md +18 -0
- data/docs/UserApi.md +4 -0
- data/docs/UserDTO.md +18 -0
- data/lib/songtradr_api_client_ruby/api/allowed_values_api.rb +4 -4
- data/lib/songtradr_api_client_ruby/api/api_keys_api.rb +1 -1
- data/lib/songtradr_api_client_ruby/api/party_api.rb +1 -1
- data/lib/songtradr_api_client_ruby/api/playlist_api.rb +1 -1
- data/lib/songtradr_api_client_ruby/api/recording_api.rb +10 -1
- data/lib/songtradr_api_client_ruby/api/user_api.rb +7 -1
- data/lib/songtradr_api_client_ruby/api_client.rb +1 -1
- data/lib/songtradr_api_client_ruby/api_error.rb +1 -1
- data/lib/songtradr_api_client_ruby/configuration.rb +10 -8
- data/lib/songtradr_api_client_ruby/models/admin_api_user_dto.rb +13 -18
- data/lib/songtradr_api_client_ruby/models/api_key_dto.rb +29 -28
- data/lib/songtradr_api_client_ruby/models/category_medium_dto.rb +30 -31
- data/lib/songtradr_api_client_ruby/models/category_minimal_dto.rb +15 -18
- data/lib/songtradr_api_client_ruby/models/config_access_dto.rb +17 -18
- data/lib/songtradr_api_client_ruby/models/config_identifier_dto.rb +17 -18
- data/lib/songtradr_api_client_ruby/models/contributor_type_dto.rb +15 -18
- data/lib/songtradr_api_client_ruby/models/create_api_key_dto.rb +13 -18
- data/lib/songtradr_api_client_ruby/models/error_response.rb +19 -18
- data/lib/songtradr_api_client_ruby/models/field_summary_dto.rb +19 -18
- data/lib/songtradr_api_client_ruby/models/file_dto.rb +23 -18
- data/lib/songtradr_api_client_ruby/models/file_list_dto.rb +21 -18
- data/lib/songtradr_api_client_ruby/models/file_minimal_with_url_dto.rb +19 -18
- data/lib/songtradr_api_client_ruby/models/file_small_dto.rb +41 -36
- data/lib/songtradr_api_client_ruby/models/file_upload_dto.rb +13 -18
- data/lib/songtradr_api_client_ruby/models/file_w_ith_url_dto.rb +17 -18
- data/lib/songtradr_api_client_ruby/models/files_summary_dto.rb +15 -18
- data/lib/songtradr_api_client_ruby/models/forgot_password_dto.rb +15 -18
- data/lib/songtradr_api_client_ruby/models/genre_dto.rb +17 -18
- data/lib/songtradr_api_client_ruby/models/genre_minimal_dto.rb +15 -18
- data/lib/songtradr_api_client_ruby/models/genres_summary_dto.rb +17 -18
- data/lib/songtradr_api_client_ruby/models/init_put_recording_audio_dto.rb +13 -18
- data/lib/songtradr_api_client_ruby/models/jwt_token_dto.rb +17 -18
- data/lib/songtradr_api_client_ruby/models/login_dto.rb +17 -18
- data/lib/songtradr_api_client_ruby/models/musical_features_dto.rb +354 -359
- data/lib/songtradr_api_client_ruby/models/p_line_dto.rb +15 -18
- data/lib/songtradr_api_client_ruby/models/party_large_dto.rb +15 -18
- data/lib/songtradr_api_client_ruby/models/party_small_dto.rb +17 -18
- data/lib/songtradr_api_client_ruby/models/playlist_large_dto.rb +25 -28
- data/lib/songtradr_api_client_ruby/models/product_medium_dto.rb +46 -39
- data/lib/songtradr_api_client_ruby/models/product_party_dto.rb +15 -18
- data/lib/songtradr_api_client_ruby/models/recording_for_similarity_search_dto.rb +17 -18
- data/lib/songtradr_api_client_ruby/models/recording_genre_prediction_dto.rb +19 -18
- data/lib/songtradr_api_client_ruby/models/recording_large_dto.rb +57 -40
- data/lib/songtradr_api_client_ruby/models/recording_list_dto.rb +21 -18
- data/lib/songtradr_api_client_ruby/models/recording_medium_dto.rb +55 -31
- data/lib/songtradr_api_client_ruby/models/recording_minimal_with_musical_features_dto.rb +28 -31
- data/lib/songtradr_api_client_ruby/models/recording_minimal_with_taggrams_dto.rb +15 -18
- data/lib/songtradr_api_client_ruby/models/recording_minimal_with_tagstrengths_dto.rb +15 -18
- data/lib/songtradr_api_client_ruby/models/recording_party_dto.rb +15 -18
- data/lib/songtradr_api_client_ruby/models/recording_playlist_dto.rb +13 -18
- data/lib/songtradr_api_client_ruby/models/recording_small_dto.rb +36 -31
- data/lib/songtradr_api_client_ruby/models/recording_tag_small_dto.rb +15 -18
- data/lib/songtradr_api_client_ruby/models/save_file_recording_dto.rb +17 -18
- data/lib/songtradr_api_client_ruby/models/save_playlist_dto.rb +21 -18
- data/lib/songtradr_api_client_ruby/models/save_recording_genre_dto.rb +15 -18
- data/lib/songtradr_api_client_ruby/models/save_recording_party_dto.rb +17 -18
- data/lib/songtradr_api_client_ruby/models/save_recording_playlist_dto.rb +17 -18
- data/lib/songtradr_api_client_ruby/models/save_recording_tag_dto.rb +15 -18
- data/lib/songtradr_api_client_ruby/models/save_referrer_dto.rb +13 -18
- data/lib/songtradr_api_client_ruby/models/save_taggrams_dto.rb +13 -18
- data/lib/songtradr_api_client_ruby/models/save_user_dto.rb +15 -18
- data/lib/songtradr_api_client_ruby/models/search_filter_values_dto.rb +95 -18
- data/lib/songtradr_api_client_ruby/models/search_recording_granular_abstraction_dto.rb +15 -18
- data/lib/songtradr_api_client_ruby/models/search_recording_granular_dto.rb +15 -18
- data/lib/songtradr_api_client_ruby/models/sign_up_dto.rb +19 -18
- data/lib/songtradr_api_client_ruby/models/tag_dto.rb +17 -18
- data/lib/songtradr_api_client_ruby/models/tag_small_dto.rb +17 -18
- data/lib/songtradr_api_client_ruby/models/taggram_dto.rb +17 -18
- data/lib/songtradr_api_client_ruby/models/tags_summary_dto.rb +17 -18
- data/lib/songtradr_api_client_ruby/models/tagstrength_dto.rb +17 -18
- data/lib/songtradr_api_client_ruby/models/title_dto.rb +15 -18
- data/lib/songtradr_api_client_ruby/models/token_request.rb +15 -18
- data/lib/songtradr_api_client_ruby/models/track_dto.rb +215 -0
- data/lib/songtradr_api_client_ruby/models/track_to_medium_product_dto.rb +17 -18
- data/lib/songtradr_api_client_ruby/models/update_password_dto.rb +17 -18
- data/lib/songtradr_api_client_ruby/models/usage_dto.rb +13 -18
- data/lib/songtradr_api_client_ruby/models/user_dto.rb +196 -19
- data/lib/songtradr_api_client_ruby/version.rb +2 -2
- data/lib/songtradr_api_client_ruby.rb +2 -1
- data/openapi-generator-config.yaml +1 -1
- data/songtradr_api_client_ruby.gemspec +1 -1
- data/spec/api/allowed_values_api_spec.rb +2 -2
- data/spec/api/api_keys_api_spec.rb +1 -1
- data/spec/api/party_api_spec.rb +1 -1
- data/spec/api/playlist_api_spec.rb +1 -1
- data/spec/api/recording_api_spec.rb +4 -1
- data/spec/api/user_api_spec.rb +3 -1
- data/spec/api_client_spec.rb +1 -1
- data/spec/configuration_spec.rb +1 -1
- data/spec/models/admin_api_user_dto_spec.rb +1 -1
- data/spec/models/api_key_dto_spec.rb +3 -3
- data/spec/models/category_medium_dto_spec.rb +3 -3
- data/spec/models/category_minimal_dto_spec.rb +1 -1
- data/spec/models/config_access_dto_spec.rb +1 -1
- data/spec/models/config_identifier_dto_spec.rb +1 -1
- data/spec/models/contributor_type_dto_spec.rb +1 -1
- data/spec/models/create_api_key_dto_spec.rb +1 -1
- data/spec/models/error_response_spec.rb +1 -1
- data/spec/models/field_summary_dto_spec.rb +1 -1
- data/spec/models/file_dto_spec.rb +1 -1
- data/spec/models/file_list_dto_spec.rb +1 -1
- data/spec/models/file_minimal_with_url_dto_spec.rb +1 -1
- data/spec/models/file_small_dto_spec.rb +7 -7
- data/spec/models/file_upload_dto_spec.rb +1 -1
- data/spec/models/file_w_ith_url_dto_spec.rb +1 -1
- data/spec/models/files_summary_dto_spec.rb +1 -1
- data/spec/models/forgot_password_dto_spec.rb +1 -1
- data/spec/models/genre_dto_spec.rb +1 -1
- data/spec/models/genre_minimal_dto_spec.rb +1 -1
- data/spec/models/genres_summary_dto_spec.rb +1 -1
- data/spec/models/init_put_recording_audio_dto_spec.rb +1 -1
- data/spec/models/jwt_token_dto_spec.rb +1 -1
- data/spec/models/login_dto_spec.rb +1 -1
- data/spec/models/musical_features_dto_spec.rb +163 -163
- data/spec/models/p_line_dto_spec.rb +1 -1
- data/spec/models/party_large_dto_spec.rb +1 -1
- data/spec/models/party_small_dto_spec.rb +1 -1
- data/spec/models/playlist_large_dto_spec.rb +4 -4
- data/spec/models/product_medium_dto_spec.rb +7 -7
- data/spec/models/product_party_dto_spec.rb +1 -1
- data/spec/models/recording_for_similarity_search_dto_spec.rb +1 -1
- data/spec/models/recording_genre_prediction_dto_spec.rb +1 -1
- data/spec/models/recording_large_dto_spec.rb +9 -9
- data/spec/models/recording_list_dto_spec.rb +1 -1
- data/spec/models/recording_medium_dto_spec.rb +10 -4
- data/spec/models/recording_minimal_with_musical_features_dto_spec.rb +3 -3
- data/spec/models/recording_minimal_with_taggrams_dto_spec.rb +1 -1
- data/spec/models/recording_minimal_with_tagstrengths_dto_spec.rb +1 -1
- data/spec/models/recording_party_dto_spec.rb +1 -1
- data/spec/models/recording_playlist_dto_spec.rb +1 -1
- data/spec/models/recording_small_dto_spec.rb +4 -4
- data/spec/models/recording_tag_small_dto_spec.rb +1 -1
- data/spec/models/save_file_recording_dto_spec.rb +1 -1
- data/spec/models/save_playlist_dto_spec.rb +1 -1
- data/spec/models/save_recording_genre_dto_spec.rb +1 -1
- data/spec/models/save_recording_party_dto_spec.rb +1 -1
- data/spec/models/save_recording_playlist_dto_spec.rb +1 -1
- data/spec/models/save_recording_tag_dto_spec.rb +1 -1
- data/spec/models/save_referrer_dto_spec.rb +1 -1
- data/spec/models/save_taggrams_dto_spec.rb +1 -1
- data/spec/models/save_user_dto_spec.rb +1 -1
- data/spec/models/search_filter_values_dto_spec.rb +1 -1
- data/spec/models/search_recording_granular_abstraction_dto_spec.rb +1 -1
- data/spec/models/search_recording_granular_dto_spec.rb +1 -1
- data/spec/models/sign_up_dto_spec.rb +1 -1
- data/spec/models/tag_dto_spec.rb +1 -1
- data/spec/models/tag_small_dto_spec.rb +1 -1
- data/spec/models/taggram_dto_spec.rb +1 -1
- data/spec/models/tags_summary_dto_spec.rb +1 -1
- data/spec/models/tagstrength_dto_spec.rb +1 -1
- data/spec/models/title_dto_spec.rb +1 -1
- data/spec/models/token_request_spec.rb +1 -1
- data/spec/models/track_dto_spec.rb +34 -0
- data/spec/models/track_to_medium_product_dto_spec.rb +1 -1
- data/spec/models/update_password_dto_spec.rb +1 -1
- data/spec/models/usage_dto_spec.rb +1 -1
- data/spec/models/user_dto_spec.rb +55 -1
- data/spec/spec_helper.rb +1 -1
- metadata +62 -58
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#This is the Songtradr API. Use it to retrieve deep music metadata and trigger processes like auto-tagging. You can also use the API to manage your account and musicube cloud data. **Authentication** 1. Reach out to support@songtradr.com to receive a free account or use your login data if you are already signed up. 2. To authenticate, you need to login via the POST /api/v1/user/login endpoint. 3. The endpoint responds with a jwtToken which you can use in all following API requests as a bearer token. **Rate Limiting** The current limit is 120 Requests per minute. Reach out to us via support@songtradr.com if you need to request more. **Getting Started with auto-tagging** 1. If you want to get your own files auto-tagged, use the POST /api/v1/user/file/{name}/initUpload endpoint. It responds with a presigned S3 link where you can upload your file. 2. You can check the processing status of your file via the GET /api/v1/user/file/{name}/filesStatus endpoint. 3. As soon as processing is done, you can request the generated data via the GET /api/v1/user/files endpoint. **Getting Started with search** You can either search the released music via the /public/recording endpoints or your own private uploaded music via the /user/file/ endpoints. 1. If you want to search the world's released music, a good starting point is the GET /api/v1/public/recording/search endpoint. Please find the extensive list of parameters that serve as semantic search filters. 2. If you want to search your own previously uploaded music, a good starting point is the GET GET /api/v1/user/files endpoint. It has the same extensive list of parameters that serve as semantic search filters.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 1.
|
|
6
|
+
The version of the OpenAPI document: 1.13.0
|
|
7
7
|
Contact: info@songtradr.com
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
OpenAPI Generator version: 7.0.0-SNAPSHOT
|
|
@@ -222,252 +222,335 @@ module SongtradrApiClientRuby
|
|
|
222
222
|
if (value = attributes[:'primary_mood_cluster']).is_a?(Array)
|
|
223
223
|
self.primary_mood_cluster = value
|
|
224
224
|
end
|
|
225
|
+
else
|
|
226
|
+
self.primary_mood_cluster = nil
|
|
225
227
|
end
|
|
226
228
|
|
|
227
229
|
if attributes.key?(:'secondary_mood_cluster')
|
|
228
230
|
if (value = attributes[:'secondary_mood_cluster']).is_a?(Array)
|
|
229
231
|
self.secondary_mood_cluster = value
|
|
230
232
|
end
|
|
233
|
+
else
|
|
234
|
+
self.secondary_mood_cluster = nil
|
|
231
235
|
end
|
|
232
236
|
|
|
233
237
|
if attributes.key?(:'tertiary_mood_cluster')
|
|
234
238
|
if (value = attributes[:'tertiary_mood_cluster']).is_a?(Array)
|
|
235
239
|
self.tertiary_mood_cluster = value
|
|
236
240
|
end
|
|
241
|
+
else
|
|
242
|
+
self.tertiary_mood_cluster = nil
|
|
237
243
|
end
|
|
238
244
|
|
|
239
245
|
if attributes.key?(:'valence')
|
|
240
246
|
if (value = attributes[:'valence']).is_a?(Array)
|
|
241
247
|
self.valence = value
|
|
242
248
|
end
|
|
249
|
+
else
|
|
250
|
+
self.valence = nil
|
|
243
251
|
end
|
|
244
252
|
|
|
245
253
|
if attributes.key?(:'arousal')
|
|
246
254
|
if (value = attributes[:'arousal']).is_a?(Array)
|
|
247
255
|
self.arousal = value
|
|
248
256
|
end
|
|
257
|
+
else
|
|
258
|
+
self.arousal = nil
|
|
249
259
|
end
|
|
250
260
|
|
|
251
261
|
if attributes.key?(:'pleasantness')
|
|
252
262
|
if (value = attributes[:'pleasantness']).is_a?(Array)
|
|
253
263
|
self.pleasantness = value
|
|
254
264
|
end
|
|
265
|
+
else
|
|
266
|
+
self.pleasantness = nil
|
|
255
267
|
end
|
|
256
268
|
|
|
257
269
|
if attributes.key?(:'engagement')
|
|
258
270
|
if (value = attributes[:'engagement']).is_a?(Array)
|
|
259
271
|
self.engagement = value
|
|
260
272
|
end
|
|
273
|
+
else
|
|
274
|
+
self.engagement = nil
|
|
261
275
|
end
|
|
262
276
|
|
|
263
277
|
if attributes.key?(:'vocals')
|
|
264
278
|
if (value = attributes[:'vocals']).is_a?(Array)
|
|
265
279
|
self.vocals = value
|
|
266
280
|
end
|
|
281
|
+
else
|
|
282
|
+
self.vocals = nil
|
|
267
283
|
end
|
|
268
284
|
|
|
269
285
|
if attributes.key?(:'dominant_instrument')
|
|
270
286
|
if (value = attributes[:'dominant_instrument']).is_a?(Array)
|
|
271
287
|
self.dominant_instrument = value
|
|
272
288
|
end
|
|
289
|
+
else
|
|
290
|
+
self.dominant_instrument = nil
|
|
273
291
|
end
|
|
274
292
|
|
|
275
293
|
if attributes.key?(:'secondary_instrument')
|
|
276
294
|
if (value = attributes[:'secondary_instrument']).is_a?(Array)
|
|
277
295
|
self.secondary_instrument = value
|
|
278
296
|
end
|
|
297
|
+
else
|
|
298
|
+
self.secondary_instrument = nil
|
|
279
299
|
end
|
|
280
300
|
|
|
281
301
|
if attributes.key?(:'tertiary_instrument')
|
|
282
302
|
if (value = attributes[:'tertiary_instrument']).is_a?(Array)
|
|
283
303
|
self.tertiary_instrument = value
|
|
284
304
|
end
|
|
305
|
+
else
|
|
306
|
+
self.tertiary_instrument = nil
|
|
285
307
|
end
|
|
286
308
|
|
|
287
309
|
if attributes.key?(:'energy')
|
|
288
310
|
if (value = attributes[:'energy']).is_a?(Array)
|
|
289
311
|
self.energy = value
|
|
290
312
|
end
|
|
313
|
+
else
|
|
314
|
+
self.energy = nil
|
|
291
315
|
end
|
|
292
316
|
|
|
293
317
|
if attributes.key?(:'sound_generation')
|
|
294
318
|
if (value = attributes[:'sound_generation']).is_a?(Array)
|
|
295
319
|
self.sound_generation = value
|
|
296
320
|
end
|
|
321
|
+
else
|
|
322
|
+
self.sound_generation = nil
|
|
297
323
|
end
|
|
298
324
|
|
|
299
325
|
if attributes.key?(:'tempo')
|
|
300
326
|
if (value = attributes[:'tempo']).is_a?(Array)
|
|
301
327
|
self.tempo = value
|
|
302
328
|
end
|
|
329
|
+
else
|
|
330
|
+
self.tempo = nil
|
|
303
331
|
end
|
|
304
332
|
|
|
305
333
|
if attributes.key?(:'scale')
|
|
306
334
|
if (value = attributes[:'scale']).is_a?(Array)
|
|
307
335
|
self.scale = value
|
|
308
336
|
end
|
|
337
|
+
else
|
|
338
|
+
self.scale = nil
|
|
309
339
|
end
|
|
310
340
|
|
|
311
341
|
if attributes.key?(:'key')
|
|
312
342
|
if (value = attributes[:'key']).is_a?(Array)
|
|
313
343
|
self.key = value
|
|
314
344
|
end
|
|
345
|
+
else
|
|
346
|
+
self.key = nil
|
|
315
347
|
end
|
|
316
348
|
|
|
317
349
|
if attributes.key?(:'rhythm')
|
|
318
350
|
if (value = attributes[:'rhythm']).is_a?(Array)
|
|
319
351
|
self.rhythm = value
|
|
320
352
|
end
|
|
353
|
+
else
|
|
354
|
+
self.rhythm = nil
|
|
321
355
|
end
|
|
322
356
|
|
|
323
357
|
if attributes.key?(:'primary_sound_character')
|
|
324
358
|
if (value = attributes[:'primary_sound_character']).is_a?(Array)
|
|
325
359
|
self.primary_sound_character = value
|
|
326
360
|
end
|
|
361
|
+
else
|
|
362
|
+
self.primary_sound_character = nil
|
|
327
363
|
end
|
|
328
364
|
|
|
329
365
|
if attributes.key?(:'timbre')
|
|
330
366
|
if (value = attributes[:'timbre']).is_a?(Array)
|
|
331
367
|
self.timbre = value
|
|
332
368
|
end
|
|
369
|
+
else
|
|
370
|
+
self.timbre = nil
|
|
333
371
|
end
|
|
334
372
|
|
|
335
373
|
if attributes.key?(:'roughness')
|
|
336
374
|
if (value = attributes[:'roughness']).is_a?(Array)
|
|
337
375
|
self.roughness = value
|
|
338
376
|
end
|
|
377
|
+
else
|
|
378
|
+
self.roughness = nil
|
|
339
379
|
end
|
|
340
380
|
|
|
341
381
|
if attributes.key?(:'tonality')
|
|
342
382
|
if (value = attributes[:'tonality']).is_a?(Array)
|
|
343
383
|
self.tonality = value
|
|
344
384
|
end
|
|
385
|
+
else
|
|
386
|
+
self.tonality = nil
|
|
345
387
|
end
|
|
346
388
|
|
|
347
389
|
if attributes.key?(:'harmony')
|
|
348
390
|
if (value = attributes[:'harmony']).is_a?(Array)
|
|
349
391
|
self.harmony = value
|
|
350
392
|
end
|
|
393
|
+
else
|
|
394
|
+
self.harmony = nil
|
|
351
395
|
end
|
|
352
396
|
|
|
353
397
|
if attributes.key?(:'texture')
|
|
354
398
|
if (value = attributes[:'texture']).is_a?(Array)
|
|
355
399
|
self.texture = value
|
|
356
400
|
end
|
|
401
|
+
else
|
|
402
|
+
self.texture = nil
|
|
357
403
|
end
|
|
358
404
|
|
|
359
405
|
if attributes.key?(:'groovyness')
|
|
360
406
|
if (value = attributes[:'groovyness']).is_a?(Array)
|
|
361
407
|
self.groovyness = value
|
|
362
408
|
end
|
|
409
|
+
else
|
|
410
|
+
self.groovyness = nil
|
|
363
411
|
end
|
|
364
412
|
|
|
365
413
|
if attributes.key?(:'space')
|
|
366
414
|
if (value = attributes[:'space']).is_a?(Array)
|
|
367
415
|
self.space = value
|
|
368
416
|
end
|
|
417
|
+
else
|
|
418
|
+
self.space = nil
|
|
369
419
|
end
|
|
370
420
|
|
|
371
421
|
if attributes.key?(:'production_rating')
|
|
372
422
|
if (value = attributes[:'production_rating']).is_a?(Array)
|
|
373
423
|
self.production_rating = value
|
|
374
424
|
end
|
|
425
|
+
else
|
|
426
|
+
self.production_rating = nil
|
|
375
427
|
end
|
|
376
428
|
|
|
377
429
|
if attributes.key?(:'performance_rating')
|
|
378
430
|
if (value = attributes[:'performance_rating']).is_a?(Array)
|
|
379
431
|
self.performance_rating = value
|
|
380
432
|
end
|
|
433
|
+
else
|
|
434
|
+
self.performance_rating = nil
|
|
381
435
|
end
|
|
382
436
|
|
|
383
437
|
if attributes.key?(:'song_rating')
|
|
384
438
|
if (value = attributes[:'song_rating']).is_a?(Array)
|
|
385
439
|
self.song_rating = value
|
|
386
440
|
end
|
|
441
|
+
else
|
|
442
|
+
self.song_rating = nil
|
|
387
443
|
end
|
|
388
444
|
|
|
389
445
|
if attributes.key?(:'audience_age')
|
|
390
446
|
if (value = attributes[:'audience_age']).is_a?(Array)
|
|
391
447
|
self.audience_age = value
|
|
392
448
|
end
|
|
449
|
+
else
|
|
450
|
+
self.audience_age = nil
|
|
393
451
|
end
|
|
394
452
|
|
|
395
453
|
if attributes.key?(:'secondary_audience_age')
|
|
396
454
|
if (value = attributes[:'secondary_audience_age']).is_a?(Array)
|
|
397
455
|
self.secondary_audience_age = value
|
|
398
456
|
end
|
|
457
|
+
else
|
|
458
|
+
self.secondary_audience_age = nil
|
|
399
459
|
end
|
|
400
460
|
|
|
401
461
|
if attributes.key?(:'tertiary_audience_age')
|
|
402
462
|
if (value = attributes[:'tertiary_audience_age']).is_a?(Array)
|
|
403
463
|
self.tertiary_audience_age = value
|
|
404
464
|
end
|
|
465
|
+
else
|
|
466
|
+
self.tertiary_audience_age = nil
|
|
405
467
|
end
|
|
406
468
|
|
|
407
469
|
if attributes.key?(:'audience_gender')
|
|
408
470
|
if (value = attributes[:'audience_gender']).is_a?(Array)
|
|
409
471
|
self.audience_gender = value
|
|
410
472
|
end
|
|
473
|
+
else
|
|
474
|
+
self.audience_gender = nil
|
|
411
475
|
end
|
|
412
476
|
|
|
413
477
|
if attributes.key?(:'audience_region')
|
|
414
478
|
if (value = attributes[:'audience_region']).is_a?(Array)
|
|
415
479
|
self.audience_region = value
|
|
416
480
|
end
|
|
481
|
+
else
|
|
482
|
+
self.audience_region = nil
|
|
417
483
|
end
|
|
418
484
|
|
|
419
485
|
if attributes.key?(:'secondary_audience_region')
|
|
420
486
|
if (value = attributes[:'secondary_audience_region']).is_a?(Array)
|
|
421
487
|
self.secondary_audience_region = value
|
|
422
488
|
end
|
|
489
|
+
else
|
|
490
|
+
self.secondary_audience_region = nil
|
|
423
491
|
end
|
|
424
492
|
|
|
425
493
|
if attributes.key?(:'tertiary_audience_region')
|
|
426
494
|
if (value = attributes[:'tertiary_audience_region']).is_a?(Array)
|
|
427
495
|
self.tertiary_audience_region = value
|
|
428
496
|
end
|
|
497
|
+
else
|
|
498
|
+
self.tertiary_audience_region = nil
|
|
429
499
|
end
|
|
430
500
|
|
|
431
501
|
if attributes.key?(:'origin_decade')
|
|
432
502
|
if (value = attributes[:'origin_decade']).is_a?(Array)
|
|
433
503
|
self.origin_decade = value
|
|
434
504
|
end
|
|
505
|
+
else
|
|
506
|
+
self.origin_decade = nil
|
|
435
507
|
end
|
|
436
508
|
|
|
437
509
|
if attributes.key?(:'origin_region')
|
|
438
510
|
if (value = attributes[:'origin_region']).is_a?(Array)
|
|
439
511
|
self.origin_region = value
|
|
440
512
|
end
|
|
513
|
+
else
|
|
514
|
+
self.origin_region = nil
|
|
441
515
|
end
|
|
442
516
|
|
|
443
517
|
if attributes.key?(:'language_of_performance')
|
|
444
518
|
if (value = attributes[:'language_of_performance']).is_a?(Array)
|
|
445
519
|
self.language_of_performance = value
|
|
446
520
|
end
|
|
521
|
+
else
|
|
522
|
+
self.language_of_performance = nil
|
|
447
523
|
end
|
|
448
524
|
|
|
449
525
|
if attributes.key?(:'curateability')
|
|
450
526
|
if (value = attributes[:'curateability']).is_a?(Array)
|
|
451
527
|
self.curateability = value
|
|
452
528
|
end
|
|
529
|
+
else
|
|
530
|
+
self.curateability = nil
|
|
453
531
|
end
|
|
454
532
|
|
|
455
533
|
if attributes.key?(:'use_case')
|
|
456
534
|
if (value = attributes[:'use_case']).is_a?(Array)
|
|
457
535
|
self.use_case = value
|
|
458
536
|
end
|
|
537
|
+
else
|
|
538
|
+
self.use_case = nil
|
|
459
539
|
end
|
|
460
540
|
|
|
461
541
|
if attributes.key?(:'channel_suitability')
|
|
462
542
|
if (value = attributes[:'channel_suitability']).is_a?(Array)
|
|
463
543
|
self.channel_suitability = value
|
|
464
544
|
end
|
|
545
|
+
else
|
|
546
|
+
self.channel_suitability = nil
|
|
465
547
|
end
|
|
466
548
|
end
|
|
467
549
|
|
|
468
550
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
469
551
|
# @return Array for valid properties with the reasons
|
|
470
552
|
def list_invalid_properties
|
|
553
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
471
554
|
invalid_properties = Array.new
|
|
472
555
|
if @primary_mood_cluster.nil?
|
|
473
556
|
invalid_properties.push('invalid value for "primary_mood_cluster", primary_mood_cluster cannot be nil.')
|
|
@@ -639,6 +722,7 @@ module SongtradrApiClientRuby
|
|
|
639
722
|
# Check to see if the all the properties in the model are valid
|
|
640
723
|
# @return true if the model is valid
|
|
641
724
|
def valid?
|
|
725
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
642
726
|
return false if @primary_mood_cluster.nil?
|
|
643
727
|
return false if @secondary_mood_cluster.nil?
|
|
644
728
|
return false if @tertiary_mood_cluster.nil?
|
|
@@ -747,37 +831,30 @@ module SongtradrApiClientRuby
|
|
|
747
831
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
748
832
|
# @return [Object] Returns the model itself
|
|
749
833
|
def self.build_from_hash(attributes)
|
|
750
|
-
new.build_from_hash(attributes)
|
|
751
|
-
end
|
|
752
|
-
|
|
753
|
-
# Builds the object from hash
|
|
754
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
|
755
|
-
# @return [Object] Returns the model itself
|
|
756
|
-
def build_from_hash(attributes)
|
|
757
834
|
return nil unless attributes.is_a?(Hash)
|
|
758
835
|
attributes = attributes.transform_keys(&:to_sym)
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
836
|
+
transformed_hash = {}
|
|
837
|
+
openapi_types.each_pair do |key, type|
|
|
838
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
839
|
+
transformed_hash["#{key}"] = nil
|
|
762
840
|
elsif type =~ /\AArray<(.*)>/i
|
|
763
841
|
# check to ensure the input is an array given that the attribute
|
|
764
842
|
# is documented as an array but the input is not
|
|
765
|
-
if attributes[
|
|
766
|
-
|
|
843
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
844
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
767
845
|
end
|
|
768
|
-
elsif !attributes[
|
|
769
|
-
|
|
846
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
847
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
770
848
|
end
|
|
771
849
|
end
|
|
772
|
-
|
|
773
|
-
self
|
|
850
|
+
new(transformed_hash)
|
|
774
851
|
end
|
|
775
852
|
|
|
776
853
|
# Deserializes the data based on type
|
|
777
854
|
# @param string type Data type
|
|
778
855
|
# @param string value Value to be deserialized
|
|
779
856
|
# @return [Object] Deserialized data
|
|
780
|
-
def _deserialize(type, value)
|
|
857
|
+
def self._deserialize(type, value)
|
|
781
858
|
case type.to_sym
|
|
782
859
|
when :Time
|
|
783
860
|
Time.parse(value)
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#This is the Songtradr API. Use it to retrieve deep music metadata and trigger processes like auto-tagging. You can also use the API to manage your account and musicube cloud data. **Authentication** 1. Reach out to support@songtradr.com to receive a free account or use your login data if you are already signed up. 2. To authenticate, you need to login via the POST /api/v1/user/login endpoint. 3. The endpoint responds with a jwtToken which you can use in all following API requests as a bearer token. **Rate Limiting** The current limit is 120 Requests per minute. Reach out to us via support@songtradr.com if you need to request more. **Getting Started with auto-tagging** 1. If you want to get your own files auto-tagged, use the POST /api/v1/user/file/{name}/initUpload endpoint. It responds with a presigned S3 link where you can upload your file. 2. You can check the processing status of your file via the GET /api/v1/user/file/{name}/filesStatus endpoint. 3. As soon as processing is done, you can request the generated data via the GET /api/v1/user/files endpoint. **Getting Started with search** You can either search the released music via the /public/recording endpoints or your own private uploaded music via the /user/file/ endpoints. 1. If you want to search the world's released music, a good starting point is the GET /api/v1/public/recording/search endpoint. Please find the extensive list of parameters that serve as semantic search filters. 2. If you want to search your own previously uploaded music, a good starting point is the GET GET /api/v1/user/files endpoint. It has the same extensive list of parameters that serve as semantic search filters.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 1.
|
|
6
|
+
The version of the OpenAPI document: 1.13.0
|
|
7
7
|
Contact: info@songtradr.com
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
OpenAPI Generator version: 7.0.0-SNAPSHOT
|
|
@@ -92,12 +92,15 @@ module SongtradrApiClientRuby
|
|
|
92
92
|
|
|
93
93
|
if attributes.key?(:'abstraction_name')
|
|
94
94
|
self.abstraction_name = attributes[:'abstraction_name']
|
|
95
|
+
else
|
|
96
|
+
self.abstraction_name = nil
|
|
95
97
|
end
|
|
96
98
|
end
|
|
97
99
|
|
|
98
100
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
99
101
|
# @return Array for valid properties with the reasons
|
|
100
102
|
def list_invalid_properties
|
|
103
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
101
104
|
invalid_properties = Array.new
|
|
102
105
|
if @abstraction_name.nil?
|
|
103
106
|
invalid_properties.push('invalid value for "abstraction_name", abstraction_name cannot be nil.')
|
|
@@ -109,6 +112,7 @@ module SongtradrApiClientRuby
|
|
|
109
112
|
# Check to see if the all the properties in the model are valid
|
|
110
113
|
# @return true if the model is valid
|
|
111
114
|
def valid?
|
|
115
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
112
116
|
return false if @abstraction_name.nil?
|
|
113
117
|
abstraction_name_validator = EnumAttributeValidator.new('String', ["brandarchetypeInnocent", "brandarchetypeSage", "brandarchetypeExplorer", "brandarchetypeOutlaw", "brandarchetypeMagician", "brandarchetypeHero", "brandarchetypeLover", "brandarchetypeJester", "brandarchetypeEveryman", "brandarchetypeCaregiver", "brandarchetypeRuler", "brandarchetypeCreator", "brandAttributeCollaborative", "brandAttributeHonest", "brandAttributeInnovative", "brandAttributeCaring", "brandAttributeDiverse", "brandAttributeTrustworthy", "brandAttributeBold", "brandAttributeFun", "brandAttributeCommitted", "brandAttributePositive", "brandAttributeHuman", "brandAttributeExcellence", "brandAttributeCreativity", "brandAttributeRespectful", "brandAttributeAuthentic", "brandAttributeConfident", "brandAttributeSafety", "brandAttributeEncouraging", "brandAttributeEmpowering", "brandAttributeFamily", "brandAttributeBalanced", "brandAttributeUplifting", "brandAttributeFearlessness", "brandAttributeImpulsive"])
|
|
114
118
|
return false unless abstraction_name_validator.valid?(@abstraction_name)
|
|
@@ -150,37 +154,30 @@ module SongtradrApiClientRuby
|
|
|
150
154
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
151
155
|
# @return [Object] Returns the model itself
|
|
152
156
|
def self.build_from_hash(attributes)
|
|
153
|
-
new.build_from_hash(attributes)
|
|
154
|
-
end
|
|
155
|
-
|
|
156
|
-
# Builds the object from hash
|
|
157
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
|
158
|
-
# @return [Object] Returns the model itself
|
|
159
|
-
def build_from_hash(attributes)
|
|
160
157
|
return nil unless attributes.is_a?(Hash)
|
|
161
158
|
attributes = attributes.transform_keys(&:to_sym)
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
159
|
+
transformed_hash = {}
|
|
160
|
+
openapi_types.each_pair do |key, type|
|
|
161
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
162
|
+
transformed_hash["#{key}"] = nil
|
|
165
163
|
elsif type =~ /\AArray<(.*)>/i
|
|
166
164
|
# check to ensure the input is an array given that the attribute
|
|
167
165
|
# is documented as an array but the input is not
|
|
168
|
-
if attributes[
|
|
169
|
-
|
|
166
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
167
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
170
168
|
end
|
|
171
|
-
elsif !attributes[
|
|
172
|
-
|
|
169
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
170
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
173
171
|
end
|
|
174
172
|
end
|
|
175
|
-
|
|
176
|
-
self
|
|
173
|
+
new(transformed_hash)
|
|
177
174
|
end
|
|
178
175
|
|
|
179
176
|
# Deserializes the data based on type
|
|
180
177
|
# @param string type Data type
|
|
181
178
|
# @param string value Value to be deserialized
|
|
182
179
|
# @return [Object] Deserialized data
|
|
183
|
-
def _deserialize(type, value)
|
|
180
|
+
def self._deserialize(type, value)
|
|
184
181
|
case type.to_sym
|
|
185
182
|
when :Time
|
|
186
183
|
Time.parse(value)
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#This is the Songtradr API. Use it to retrieve deep music metadata and trigger processes like auto-tagging. You can also use the API to manage your account and musicube cloud data. **Authentication** 1. Reach out to support@songtradr.com to receive a free account or use your login data if you are already signed up. 2. To authenticate, you need to login via the POST /api/v1/user/login endpoint. 3. The endpoint responds with a jwtToken which you can use in all following API requests as a bearer token. **Rate Limiting** The current limit is 120 Requests per minute. Reach out to us via support@songtradr.com if you need to request more. **Getting Started with auto-tagging** 1. If you want to get your own files auto-tagged, use the POST /api/v1/user/file/{name}/initUpload endpoint. It responds with a presigned S3 link where you can upload your file. 2. You can check the processing status of your file via the GET /api/v1/user/file/{name}/filesStatus endpoint. 3. As soon as processing is done, you can request the generated data via the GET /api/v1/user/files endpoint. **Getting Started with search** You can either search the released music via the /public/recording endpoints or your own private uploaded music via the /user/file/ endpoints. 1. If you want to search the world's released music, a good starting point is the GET /api/v1/public/recording/search endpoint. Please find the extensive list of parameters that serve as semantic search filters. 2. If you want to search your own previously uploaded music, a good starting point is the GET GET /api/v1/user/files endpoint. It has the same extensive list of parameters that serve as semantic search filters.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 1.
|
|
6
|
+
The version of the OpenAPI document: 1.13.0
|
|
7
7
|
Contact: info@songtradr.com
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
OpenAPI Generator version: 7.0.0-SNAPSHOT
|
|
@@ -69,12 +69,15 @@ module SongtradrApiClientRuby
|
|
|
69
69
|
|
|
70
70
|
if attributes.key?(:'tag_name')
|
|
71
71
|
self.tag_name = attributes[:'tag_name']
|
|
72
|
+
else
|
|
73
|
+
self.tag_name = nil
|
|
72
74
|
end
|
|
73
75
|
end
|
|
74
76
|
|
|
75
77
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
76
78
|
# @return Array for valid properties with the reasons
|
|
77
79
|
def list_invalid_properties
|
|
80
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
78
81
|
invalid_properties = Array.new
|
|
79
82
|
if @tag_name.nil?
|
|
80
83
|
invalid_properties.push('invalid value for "tag_name", tag_name cannot be nil.')
|
|
@@ -86,6 +89,7 @@ module SongtradrApiClientRuby
|
|
|
86
89
|
# Check to see if the all the properties in the model are valid
|
|
87
90
|
# @return true if the model is valid
|
|
88
91
|
def valid?
|
|
92
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
89
93
|
return false if @tag_name.nil?
|
|
90
94
|
true
|
|
91
95
|
end
|
|
@@ -115,37 +119,30 @@ module SongtradrApiClientRuby
|
|
|
115
119
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
116
120
|
# @return [Object] Returns the model itself
|
|
117
121
|
def self.build_from_hash(attributes)
|
|
118
|
-
new.build_from_hash(attributes)
|
|
119
|
-
end
|
|
120
|
-
|
|
121
|
-
# Builds the object from hash
|
|
122
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
|
123
|
-
# @return [Object] Returns the model itself
|
|
124
|
-
def build_from_hash(attributes)
|
|
125
122
|
return nil unless attributes.is_a?(Hash)
|
|
126
123
|
attributes = attributes.transform_keys(&:to_sym)
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
124
|
+
transformed_hash = {}
|
|
125
|
+
openapi_types.each_pair do |key, type|
|
|
126
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
127
|
+
transformed_hash["#{key}"] = nil
|
|
130
128
|
elsif type =~ /\AArray<(.*)>/i
|
|
131
129
|
# check to ensure the input is an array given that the attribute
|
|
132
130
|
# is documented as an array but the input is not
|
|
133
|
-
if attributes[
|
|
134
|
-
|
|
131
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
132
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
135
133
|
end
|
|
136
|
-
elsif !attributes[
|
|
137
|
-
|
|
134
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
135
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
138
136
|
end
|
|
139
137
|
end
|
|
140
|
-
|
|
141
|
-
self
|
|
138
|
+
new(transformed_hash)
|
|
142
139
|
end
|
|
143
140
|
|
|
144
141
|
# Deserializes the data based on type
|
|
145
142
|
# @param string type Data type
|
|
146
143
|
# @param string value Value to be deserialized
|
|
147
144
|
# @return [Object] Deserialized data
|
|
148
|
-
def _deserialize(type, value)
|
|
145
|
+
def self._deserialize(type, value)
|
|
149
146
|
case type.to_sym
|
|
150
147
|
when :Time
|
|
151
148
|
Time.parse(value)
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#This is the Songtradr API. Use it to retrieve deep music metadata and trigger processes like auto-tagging. You can also use the API to manage your account and musicube cloud data. **Authentication** 1. Reach out to support@songtradr.com to receive a free account or use your login data if you are already signed up. 2. To authenticate, you need to login via the POST /api/v1/user/login endpoint. 3. The endpoint responds with a jwtToken which you can use in all following API requests as a bearer token. **Rate Limiting** The current limit is 120 Requests per minute. Reach out to us via support@songtradr.com if you need to request more. **Getting Started with auto-tagging** 1. If you want to get your own files auto-tagged, use the POST /api/v1/user/file/{name}/initUpload endpoint. It responds with a presigned S3 link where you can upload your file. 2. You can check the processing status of your file via the GET /api/v1/user/file/{name}/filesStatus endpoint. 3. As soon as processing is done, you can request the generated data via the GET /api/v1/user/files endpoint. **Getting Started with search** You can either search the released music via the /public/recording endpoints or your own private uploaded music via the /user/file/ endpoints. 1. If you want to search the world's released music, a good starting point is the GET /api/v1/public/recording/search endpoint. Please find the extensive list of parameters that serve as semantic search filters. 2. If you want to search your own previously uploaded music, a good starting point is the GET GET /api/v1/user/files endpoint. It has the same extensive list of parameters that serve as semantic search filters.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 1.
|
|
6
|
+
The version of the OpenAPI document: 1.13.0
|
|
7
7
|
Contact: info@songtradr.com
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
OpenAPI Generator version: 7.0.0-SNAPSHOT
|
|
@@ -72,14 +72,20 @@ module SongtradrApiClientRuby
|
|
|
72
72
|
|
|
73
73
|
if attributes.key?(:'email_address')
|
|
74
74
|
self.email_address = attributes[:'email_address']
|
|
75
|
+
else
|
|
76
|
+
self.email_address = nil
|
|
75
77
|
end
|
|
76
78
|
|
|
77
79
|
if attributes.key?(:'password')
|
|
78
80
|
self.password = attributes[:'password']
|
|
81
|
+
else
|
|
82
|
+
self.password = nil
|
|
79
83
|
end
|
|
80
84
|
|
|
81
85
|
if attributes.key?(:'full_name')
|
|
82
86
|
self.full_name = attributes[:'full_name']
|
|
87
|
+
else
|
|
88
|
+
self.full_name = nil
|
|
83
89
|
end
|
|
84
90
|
|
|
85
91
|
if attributes.key?(:'company_name')
|
|
@@ -90,6 +96,7 @@ module SongtradrApiClientRuby
|
|
|
90
96
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
91
97
|
# @return Array for valid properties with the reasons
|
|
92
98
|
def list_invalid_properties
|
|
99
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
93
100
|
invalid_properties = Array.new
|
|
94
101
|
if @email_address.nil?
|
|
95
102
|
invalid_properties.push('invalid value for "email_address", email_address cannot be nil.')
|
|
@@ -109,6 +116,7 @@ module SongtradrApiClientRuby
|
|
|
109
116
|
# Check to see if the all the properties in the model are valid
|
|
110
117
|
# @return true if the model is valid
|
|
111
118
|
def valid?
|
|
119
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
112
120
|
return false if @email_address.nil?
|
|
113
121
|
return false if @password.nil?
|
|
114
122
|
return false if @full_name.nil?
|
|
@@ -142,37 +150,30 @@ module SongtradrApiClientRuby
|
|
|
142
150
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
143
151
|
# @return [Object] Returns the model itself
|
|
144
152
|
def self.build_from_hash(attributes)
|
|
145
|
-
new.build_from_hash(attributes)
|
|
146
|
-
end
|
|
147
|
-
|
|
148
|
-
# Builds the object from hash
|
|
149
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
|
150
|
-
# @return [Object] Returns the model itself
|
|
151
|
-
def build_from_hash(attributes)
|
|
152
153
|
return nil unless attributes.is_a?(Hash)
|
|
153
154
|
attributes = attributes.transform_keys(&:to_sym)
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
155
|
+
transformed_hash = {}
|
|
156
|
+
openapi_types.each_pair do |key, type|
|
|
157
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
158
|
+
transformed_hash["#{key}"] = nil
|
|
157
159
|
elsif type =~ /\AArray<(.*)>/i
|
|
158
160
|
# check to ensure the input is an array given that the attribute
|
|
159
161
|
# is documented as an array but the input is not
|
|
160
|
-
if attributes[
|
|
161
|
-
|
|
162
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
163
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
162
164
|
end
|
|
163
|
-
elsif !attributes[
|
|
164
|
-
|
|
165
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
166
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
165
167
|
end
|
|
166
168
|
end
|
|
167
|
-
|
|
168
|
-
self
|
|
169
|
+
new(transformed_hash)
|
|
169
170
|
end
|
|
170
171
|
|
|
171
172
|
# Deserializes the data based on type
|
|
172
173
|
# @param string type Data type
|
|
173
174
|
# @param string value Value to be deserialized
|
|
174
175
|
# @return [Object] Deserialized data
|
|
175
|
-
def _deserialize(type, value)
|
|
176
|
+
def self._deserialize(type, value)
|
|
176
177
|
case type.to_sym
|
|
177
178
|
when :Time
|
|
178
179
|
Time.parse(value)
|