songtradr_api_client_ruby 1.12.23 → 1.12.24

Sign up to get free protection for your applications and to get access to all the features.
Files changed (176) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +1 -1
  3. data/README.md +5 -5
  4. data/docs/AllowedValuesApi.md +2 -2
  5. data/docs/ApiKeyDTO.md +2 -2
  6. data/docs/FileSmallDTO.md +15 -15
  7. data/docs/MusicalFeaturesDTO.md +68 -68
  8. data/docs/PlaylistLargeDTO.md +7 -7
  9. data/docs/ProductMediumDTO.md +7 -7
  10. data/docs/ProductPartyDTO.md +3 -3
  11. data/docs/RecordingApi.md +2 -0
  12. data/docs/RecordingGenrePredictionDTO.md +4 -4
  13. data/docs/RecordingLargeDTO.md +8 -8
  14. data/docs/RecordingMediumDTO.md +6 -6
  15. data/docs/RecordingMinimalWithMusicalFeaturesDTO.md +3 -3
  16. data/docs/RecordingPartyDTO.md +3 -3
  17. data/docs/RecordingSmallDTO.md +3 -3
  18. data/docs/UserApi.md +4 -0
  19. data/docs/UserDTO.md +18 -0
  20. data/lib/songtradr_api_client_ruby/api/allowed_values_api.rb +4 -4
  21. data/lib/songtradr_api_client_ruby/api/api_keys_api.rb +1 -1
  22. data/lib/songtradr_api_client_ruby/api/party_api.rb +1 -1
  23. data/lib/songtradr_api_client_ruby/api/playlist_api.rb +1 -1
  24. data/lib/songtradr_api_client_ruby/api/recording_api.rb +4 -1
  25. data/lib/songtradr_api_client_ruby/api/user_api.rb +7 -1
  26. data/lib/songtradr_api_client_ruby/api_client.rb +1 -1
  27. data/lib/songtradr_api_client_ruby/api_error.rb +1 -1
  28. data/lib/songtradr_api_client_ruby/configuration.rb +10 -8
  29. data/lib/songtradr_api_client_ruby/models/admin_api_user_dto.rb +13 -18
  30. data/lib/songtradr_api_client_ruby/models/api_key_dto.rb +29 -28
  31. data/lib/songtradr_api_client_ruby/models/category_medium_dto.rb +17 -18
  32. data/lib/songtradr_api_client_ruby/models/category_minimal_dto.rb +15 -18
  33. data/lib/songtradr_api_client_ruby/models/config_access_dto.rb +17 -18
  34. data/lib/songtradr_api_client_ruby/models/config_identifier_dto.rb +17 -18
  35. data/lib/songtradr_api_client_ruby/models/contributor_type_dto.rb +15 -18
  36. data/lib/songtradr_api_client_ruby/models/create_api_key_dto.rb +13 -18
  37. data/lib/songtradr_api_client_ruby/models/error_response.rb +19 -18
  38. data/lib/songtradr_api_client_ruby/models/field_summary_dto.rb +19 -18
  39. data/lib/songtradr_api_client_ruby/models/file_dto.rb +23 -18
  40. data/lib/songtradr_api_client_ruby/models/file_list_dto.rb +21 -18
  41. data/lib/songtradr_api_client_ruby/models/file_minimal_with_url_dto.rb +19 -18
  42. data/lib/songtradr_api_client_ruby/models/file_small_dto.rb +84 -79
  43. data/lib/songtradr_api_client_ruby/models/file_upload_dto.rb +13 -18
  44. data/lib/songtradr_api_client_ruby/models/file_w_ith_url_dto.rb +17 -18
  45. data/lib/songtradr_api_client_ruby/models/files_summary_dto.rb +15 -18
  46. data/lib/songtradr_api_client_ruby/models/forgot_password_dto.rb +15 -18
  47. data/lib/songtradr_api_client_ruby/models/genre_dto.rb +17 -18
  48. data/lib/songtradr_api_client_ruby/models/genre_minimal_dto.rb +15 -18
  49. data/lib/songtradr_api_client_ruby/models/genres_summary_dto.rb +17 -18
  50. data/lib/songtradr_api_client_ruby/models/init_put_recording_audio_dto.rb +13 -18
  51. data/lib/songtradr_api_client_ruby/models/jwt_token_dto.rb +17 -18
  52. data/lib/songtradr_api_client_ruby/models/login_dto.rb +17 -18
  53. data/lib/songtradr_api_client_ruby/models/musical_features_dto.rb +448 -453
  54. data/lib/songtradr_api_client_ruby/models/p_line_dto.rb +15 -18
  55. data/lib/songtradr_api_client_ruby/models/party_large_dto.rb +15 -18
  56. data/lib/songtradr_api_client_ruby/models/party_small_dto.rb +17 -18
  57. data/lib/songtradr_api_client_ruby/models/playlist_large_dto.rb +45 -48
  58. data/lib/songtradr_api_client_ruby/models/product_medium_dto.rb +66 -59
  59. data/lib/songtradr_api_client_ruby/models/product_party_dto.rb +28 -31
  60. data/lib/songtradr_api_client_ruby/models/recording_for_similarity_search_dto.rb +17 -18
  61. data/lib/songtradr_api_client_ruby/models/recording_genre_prediction_dto.rb +38 -37
  62. data/lib/songtradr_api_client_ruby/models/recording_large_dto.rb +74 -57
  63. data/lib/songtradr_api_client_ruby/models/recording_list_dto.rb +21 -18
  64. data/lib/songtradr_api_client_ruby/models/recording_medium_dto.rb +61 -48
  65. data/lib/songtradr_api_client_ruby/models/recording_minimal_with_musical_features_dto.rb +28 -31
  66. data/lib/songtradr_api_client_ruby/models/recording_minimal_with_taggrams_dto.rb +15 -18
  67. data/lib/songtradr_api_client_ruby/models/recording_minimal_with_tagstrengths_dto.rb +15 -18
  68. data/lib/songtradr_api_client_ruby/models/recording_party_dto.rb +28 -31
  69. data/lib/songtradr_api_client_ruby/models/recording_playlist_dto.rb +13 -18
  70. data/lib/songtradr_api_client_ruby/models/recording_small_dto.rb +36 -31
  71. data/lib/songtradr_api_client_ruby/models/recording_tag_small_dto.rb +15 -18
  72. data/lib/songtradr_api_client_ruby/models/save_file_recording_dto.rb +17 -18
  73. data/lib/songtradr_api_client_ruby/models/save_playlist_dto.rb +21 -18
  74. data/lib/songtradr_api_client_ruby/models/save_recording_genre_dto.rb +15 -18
  75. data/lib/songtradr_api_client_ruby/models/save_recording_party_dto.rb +17 -18
  76. data/lib/songtradr_api_client_ruby/models/save_recording_playlist_dto.rb +17 -18
  77. data/lib/songtradr_api_client_ruby/models/save_recording_tag_dto.rb +15 -18
  78. data/lib/songtradr_api_client_ruby/models/save_referrer_dto.rb +13 -18
  79. data/lib/songtradr_api_client_ruby/models/save_taggrams_dto.rb +13 -18
  80. data/lib/songtradr_api_client_ruby/models/save_user_dto.rb +15 -18
  81. data/lib/songtradr_api_client_ruby/models/search_filter_values_dto.rb +95 -18
  82. data/lib/songtradr_api_client_ruby/models/search_recording_granular_abstraction_dto.rb +15 -18
  83. data/lib/songtradr_api_client_ruby/models/search_recording_granular_dto.rb +15 -18
  84. data/lib/songtradr_api_client_ruby/models/sign_up_dto.rb +19 -18
  85. data/lib/songtradr_api_client_ruby/models/tag_dto.rb +17 -18
  86. data/lib/songtradr_api_client_ruby/models/tag_small_dto.rb +17 -18
  87. data/lib/songtradr_api_client_ruby/models/taggram_dto.rb +17 -18
  88. data/lib/songtradr_api_client_ruby/models/tags_summary_dto.rb +17 -18
  89. data/lib/songtradr_api_client_ruby/models/tagstrength_dto.rb +17 -18
  90. data/lib/songtradr_api_client_ruby/models/title_dto.rb +15 -18
  91. data/lib/songtradr_api_client_ruby/models/token_request.rb +15 -18
  92. data/lib/songtradr_api_client_ruby/models/track_to_medium_product_dto.rb +17 -18
  93. data/lib/songtradr_api_client_ruby/models/update_password_dto.rb +17 -18
  94. data/lib/songtradr_api_client_ruby/models/usage_dto.rb +13 -18
  95. data/lib/songtradr_api_client_ruby/models/user_dto.rb +196 -19
  96. data/lib/songtradr_api_client_ruby/version.rb +2 -2
  97. data/lib/songtradr_api_client_ruby.rb +1 -1
  98. data/openapi-generator-config.yaml +1 -1
  99. data/songtradr_api_client_ruby.gemspec +1 -1
  100. data/spec/api/allowed_values_api_spec.rb +2 -2
  101. data/spec/api/api_keys_api_spec.rb +1 -1
  102. data/spec/api/party_api_spec.rb +1 -1
  103. data/spec/api/playlist_api_spec.rb +1 -1
  104. data/spec/api/recording_api_spec.rb +2 -1
  105. data/spec/api/user_api_spec.rb +3 -1
  106. data/spec/api_client_spec.rb +1 -1
  107. data/spec/configuration_spec.rb +1 -1
  108. data/spec/models/admin_api_user_dto_spec.rb +1 -1
  109. data/spec/models/api_key_dto_spec.rb +3 -3
  110. data/spec/models/category_medium_dto_spec.rb +1 -1
  111. data/spec/models/category_minimal_dto_spec.rb +1 -1
  112. data/spec/models/config_access_dto_spec.rb +1 -1
  113. data/spec/models/config_identifier_dto_spec.rb +1 -1
  114. data/spec/models/contributor_type_dto_spec.rb +1 -1
  115. data/spec/models/create_api_key_dto_spec.rb +1 -1
  116. data/spec/models/error_response_spec.rb +1 -1
  117. data/spec/models/field_summary_dto_spec.rb +1 -1
  118. data/spec/models/file_dto_spec.rb +1 -1
  119. data/spec/models/file_list_dto_spec.rb +1 -1
  120. data/spec/models/file_minimal_with_url_dto_spec.rb +1 -1
  121. data/spec/models/file_small_dto_spec.rb +19 -19
  122. data/spec/models/file_upload_dto_spec.rb +1 -1
  123. data/spec/models/file_w_ith_url_dto_spec.rb +1 -1
  124. data/spec/models/files_summary_dto_spec.rb +1 -1
  125. data/spec/models/forgot_password_dto_spec.rb +1 -1
  126. data/spec/models/genre_dto_spec.rb +1 -1
  127. data/spec/models/genre_minimal_dto_spec.rb +1 -1
  128. data/spec/models/genres_summary_dto_spec.rb +1 -1
  129. data/spec/models/init_put_recording_audio_dto_spec.rb +1 -1
  130. data/spec/models/jwt_token_dto_spec.rb +1 -1
  131. data/spec/models/login_dto_spec.rb +1 -1
  132. data/spec/models/musical_features_dto_spec.rb +121 -121
  133. data/spec/models/p_line_dto_spec.rb +1 -1
  134. data/spec/models/party_large_dto_spec.rb +1 -1
  135. data/spec/models/party_small_dto_spec.rb +1 -1
  136. data/spec/models/playlist_large_dto_spec.rb +10 -10
  137. data/spec/models/product_medium_dto_spec.rb +9 -9
  138. data/spec/models/product_party_dto_spec.rb +3 -3
  139. data/spec/models/recording_for_similarity_search_dto_spec.rb +1 -1
  140. data/spec/models/recording_genre_prediction_dto_spec.rb +3 -3
  141. data/spec/models/recording_large_dto_spec.rb +12 -12
  142. data/spec/models/recording_list_dto_spec.rb +1 -1
  143. data/spec/models/recording_medium_dto_spec.rb +9 -9
  144. data/spec/models/recording_minimal_with_musical_features_dto_spec.rb +3 -3
  145. data/spec/models/recording_minimal_with_taggrams_dto_spec.rb +1 -1
  146. data/spec/models/recording_minimal_with_tagstrengths_dto_spec.rb +1 -1
  147. data/spec/models/recording_party_dto_spec.rb +3 -3
  148. data/spec/models/recording_playlist_dto_spec.rb +1 -1
  149. data/spec/models/recording_small_dto_spec.rb +4 -4
  150. data/spec/models/recording_tag_small_dto_spec.rb +1 -1
  151. data/spec/models/save_file_recording_dto_spec.rb +1 -1
  152. data/spec/models/save_playlist_dto_spec.rb +1 -1
  153. data/spec/models/save_recording_genre_dto_spec.rb +1 -1
  154. data/spec/models/save_recording_party_dto_spec.rb +1 -1
  155. data/spec/models/save_recording_playlist_dto_spec.rb +1 -1
  156. data/spec/models/save_recording_tag_dto_spec.rb +1 -1
  157. data/spec/models/save_referrer_dto_spec.rb +1 -1
  158. data/spec/models/save_taggrams_dto_spec.rb +1 -1
  159. data/spec/models/save_user_dto_spec.rb +1 -1
  160. data/spec/models/search_filter_values_dto_spec.rb +1 -1
  161. data/spec/models/search_recording_granular_abstraction_dto_spec.rb +1 -1
  162. data/spec/models/search_recording_granular_dto_spec.rb +1 -1
  163. data/spec/models/sign_up_dto_spec.rb +1 -1
  164. data/spec/models/tag_dto_spec.rb +1 -1
  165. data/spec/models/tag_small_dto_spec.rb +1 -1
  166. data/spec/models/taggram_dto_spec.rb +1 -1
  167. data/spec/models/tags_summary_dto_spec.rb +1 -1
  168. data/spec/models/tagstrength_dto_spec.rb +1 -1
  169. data/spec/models/title_dto_spec.rb +1 -1
  170. data/spec/models/token_request_spec.rb +1 -1
  171. data/spec/models/track_to_medium_product_dto_spec.rb +1 -1
  172. data/spec/models/update_password_dto_spec.rb +1 -1
  173. data/spec/models/usage_dto_spec.rb +1 -1
  174. data/spec/models/user_dto_spec.rb +55 -1
  175. data/spec/spec_helper.rb +1 -1
  176. metadata +2 -2
@@ -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.12.23
6
+ The version of the OpenAPI document: 1.12.24
7
7
  Contact: info@songtradr.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 7.0.0-SNAPSHOT
@@ -18,11 +18,7 @@ module SongtradrApiClientRuby
18
18
  class RecordingLargeDTO
19
19
  attr_accessor :duration
20
20
 
21
- attr_accessor :pline
22
-
23
- attr_accessor :spotify_id
24
-
25
- attr_accessor :genre_predictions
21
+ attr_accessor :isrc
26
22
 
27
23
  attr_accessor :parties
28
24
 
@@ -38,15 +34,17 @@ module SongtradrApiClientRuby
38
34
 
39
35
  attr_accessor :tags
40
36
 
41
- attr_accessor :isrc
37
+ attr_accessor :spotify_id
38
+
39
+ attr_accessor :pline
40
+
41
+ attr_accessor :genre_predictions
42
42
 
43
43
  # Attribute mapping from ruby-style variable name to JSON key.
44
44
  def self.attribute_map
45
45
  {
46
46
  :'duration' => :'duration',
47
- :'pline' => :'pline',
48
- :'spotify_id' => :'spotifyId',
49
- :'genre_predictions' => :'genrePredictions',
47
+ :'isrc' => :'isrc',
50
48
  :'parties' => :'parties',
51
49
  :'genres' => :'genres',
52
50
  :'language_of_performance' => :'languageOfPerformance',
@@ -54,7 +52,9 @@ module SongtradrApiClientRuby
54
52
  :'tracks' => :'tracks',
55
53
  :'musical_features' => :'musicalFeatures',
56
54
  :'tags' => :'tags',
57
- :'isrc' => :'isrc'
55
+ :'spotify_id' => :'spotifyId',
56
+ :'pline' => :'pline',
57
+ :'genre_predictions' => :'genrePredictions'
58
58
  }
59
59
  end
60
60
 
@@ -67,9 +67,7 @@ module SongtradrApiClientRuby
67
67
  def self.openapi_types
68
68
  {
69
69
  :'duration' => :'Integer',
70
- :'pline' => :'PLineDTO',
71
- :'spotify_id' => :'String',
72
- :'genre_predictions' => :'Array<RecordingGenrePredictionDTO>',
70
+ :'isrc' => :'String',
73
71
  :'parties' => :'Array<RecordingPartyDTO>',
74
72
  :'genres' => :'Array<GenreDTO>',
75
73
  :'language_of_performance' => :'String',
@@ -77,7 +75,9 @@ module SongtradrApiClientRuby
77
75
  :'tracks' => :'Array<TrackToMediumProductDTO>',
78
76
  :'musical_features' => :'MusicalFeaturesDTO',
79
77
  :'tags' => :'Array<RecordingTagSmallDTO>',
80
- :'isrc' => :'String'
78
+ :'spotify_id' => :'String',
79
+ :'pline' => :'PLineDTO',
80
+ :'genre_predictions' => :'Array<RecordingGenrePredictionDTO>'
81
81
  }
82
82
  end
83
83
 
@@ -106,18 +106,10 @@ module SongtradrApiClientRuby
106
106
  self.duration = attributes[:'duration']
107
107
  end
108
108
 
109
- if attributes.key?(:'pline')
110
- self.pline = attributes[:'pline']
111
- end
112
-
113
- if attributes.key?(:'spotify_id')
114
- self.spotify_id = attributes[:'spotify_id']
115
- end
116
-
117
- if attributes.key?(:'genre_predictions')
118
- if (value = attributes[:'genre_predictions']).is_a?(Array)
119
- self.genre_predictions = value
120
- end
109
+ if attributes.key?(:'isrc')
110
+ self.isrc = attributes[:'isrc']
111
+ else
112
+ self.isrc = nil
121
113
  end
122
114
 
123
115
  if attributes.key?(:'parties')
@@ -158,14 +150,25 @@ module SongtradrApiClientRuby
158
150
  end
159
151
  end
160
152
 
161
- if attributes.key?(:'isrc')
162
- self.isrc = attributes[:'isrc']
153
+ if attributes.key?(:'spotify_id')
154
+ self.spotify_id = attributes[:'spotify_id']
155
+ end
156
+
157
+ if attributes.key?(:'pline')
158
+ self.pline = attributes[:'pline']
159
+ end
160
+
161
+ if attributes.key?(:'genre_predictions')
162
+ if (value = attributes[:'genre_predictions']).is_a?(Array)
163
+ self.genre_predictions = value
164
+ end
163
165
  end
164
166
  end
165
167
 
166
168
  # Show invalid properties with the reasons. Usually used together with valid?
167
169
  # @return Array for valid properties with the reasons
168
170
  def list_invalid_properties
171
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
169
172
  invalid_properties = Array.new
170
173
  if @isrc.nil?
171
174
  invalid_properties.push('invalid value for "isrc", isrc cannot be nil.')
@@ -177,49 +180,68 @@ module SongtradrApiClientRuby
177
180
  # Check to see if the all the properties in the model are valid
178
181
  # @return true if the model is valid
179
182
  def valid?
183
+ warn '[DEPRECATED] the `valid?` method is obsolete'
180
184
  return false if @isrc.nil?
181
185
  true
182
186
  end
183
187
 
184
- # Custom attribute writer method with validation
185
- # @param [Object] genre_predictions Value to be assigned
186
- def genre_predictions=(genre_predictions)
187
- @genre_predictions = genre_predictions
188
- end
189
-
190
188
  # Custom attribute writer method with validation
191
189
  # @param [Object] parties Value to be assigned
192
190
  def parties=(parties)
191
+ if parties.nil?
192
+ fail ArgumentError, 'parties cannot be nil'
193
+ end
194
+
193
195
  @parties = parties
194
196
  end
195
197
 
196
198
  # Custom attribute writer method with validation
197
199
  # @param [Object] genres Value to be assigned
198
200
  def genres=(genres)
201
+ if genres.nil?
202
+ fail ArgumentError, 'genres cannot be nil'
203
+ end
204
+
199
205
  @genres = genres
200
206
  end
201
207
 
202
208
  # Custom attribute writer method with validation
203
209
  # @param [Object] titles Value to be assigned
204
210
  def titles=(titles)
211
+ if titles.nil?
212
+ fail ArgumentError, 'titles cannot be nil'
213
+ end
214
+
205
215
  @titles = titles
206
216
  end
207
217
 
208
218
  # Custom attribute writer method with validation
209
219
  # @param [Object] tracks Value to be assigned
210
220
  def tracks=(tracks)
221
+ if tracks.nil?
222
+ fail ArgumentError, 'tracks cannot be nil'
223
+ end
224
+
211
225
  @tracks = tracks
212
226
  end
213
227
 
228
+ # Custom attribute writer method with validation
229
+ # @param [Object] genre_predictions Value to be assigned
230
+ def genre_predictions=(genre_predictions)
231
+ if genre_predictions.nil?
232
+ fail ArgumentError, 'genre_predictions cannot be nil'
233
+ end
234
+
235
+ @genre_predictions = genre_predictions
236
+ end
237
+
214
238
  # Checks equality by comparing each attribute.
215
239
  # @param [Object] Object to be compared
216
240
  def ==(o)
217
241
  return true if self.equal?(o)
218
242
  self.class == o.class &&
219
243
  duration == o.duration &&
220
- pline == o.pline &&
221
- spotify_id == o.spotify_id &&
222
- genre_predictions == o.genre_predictions &&
244
+ isrc == o.isrc &&
223
245
  parties == o.parties &&
224
246
  genres == o.genres &&
225
247
  language_of_performance == o.language_of_performance &&
@@ -227,7 +249,9 @@ module SongtradrApiClientRuby
227
249
  tracks == o.tracks &&
228
250
  musical_features == o.musical_features &&
229
251
  tags == o.tags &&
230
- isrc == o.isrc
252
+ spotify_id == o.spotify_id &&
253
+ pline == o.pline &&
254
+ genre_predictions == o.genre_predictions
231
255
  end
232
256
 
233
257
  # @see the `==` method
@@ -239,44 +263,37 @@ module SongtradrApiClientRuby
239
263
  # Calculates hash code according to all attributes.
240
264
  # @return [Integer] Hash code
241
265
  def hash
242
- [duration, pline, spotify_id, genre_predictions, parties, genres, language_of_performance, titles, tracks, musical_features, tags, isrc].hash
266
+ [duration, isrc, parties, genres, language_of_performance, titles, tracks, musical_features, tags, spotify_id, pline, genre_predictions].hash
243
267
  end
244
268
 
245
269
  # Builds the object from hash
246
270
  # @param [Hash] attributes Model attributes in the form of hash
247
271
  # @return [Object] Returns the model itself
248
272
  def self.build_from_hash(attributes)
249
- new.build_from_hash(attributes)
250
- end
251
-
252
- # Builds the object from hash
253
- # @param [Hash] attributes Model attributes in the form of hash
254
- # @return [Object] Returns the model itself
255
- def build_from_hash(attributes)
256
273
  return nil unless attributes.is_a?(Hash)
257
274
  attributes = attributes.transform_keys(&:to_sym)
258
- self.class.openapi_types.each_pair do |key, type|
259
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
260
- self.send("#{key}=", nil)
275
+ transformed_hash = {}
276
+ openapi_types.each_pair do |key, type|
277
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
278
+ transformed_hash["#{key}"] = nil
261
279
  elsif type =~ /\AArray<(.*)>/i
262
280
  # check to ensure the input is an array given that the attribute
263
281
  # is documented as an array but the input is not
264
- if attributes[self.class.attribute_map[key]].is_a?(Array)
265
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
282
+ if attributes[attribute_map[key]].is_a?(Array)
283
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
266
284
  end
267
- elsif !attributes[self.class.attribute_map[key]].nil?
268
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
285
+ elsif !attributes[attribute_map[key]].nil?
286
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
269
287
  end
270
288
  end
271
-
272
- self
289
+ new(transformed_hash)
273
290
  end
274
291
 
275
292
  # Deserializes the data based on type
276
293
  # @param string type Data type
277
294
  # @param string value Value to be deserialized
278
295
  # @return [Object] Deserialized data
279
- def _deserialize(type, value)
296
+ def self._deserialize(type, value)
280
297
  case type.to_sym
281
298
  when :Time
282
299
  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.12.23
6
+ The version of the OpenAPI document: 1.12.24
7
7
  Contact: info@songtradr.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 7.0.0-SNAPSHOT
@@ -74,24 +74,33 @@ module SongtradrApiClientRuby
74
74
  if (value = attributes[:'recordings']).is_a?(Array)
75
75
  self.recordings = value
76
76
  end
77
+ else
78
+ self.recordings = nil
77
79
  end
78
80
 
79
81
  if attributes.key?(:'has_next_page')
80
82
  self.has_next_page = attributes[:'has_next_page']
83
+ else
84
+ self.has_next_page = nil
81
85
  end
82
86
 
83
87
  if attributes.key?(:'current_page_number')
84
88
  self.current_page_number = attributes[:'current_page_number']
89
+ else
90
+ self.current_page_number = nil
85
91
  end
86
92
 
87
93
  if attributes.key?(:'total_results')
88
94
  self.total_results = attributes[:'total_results']
95
+ else
96
+ self.total_results = nil
89
97
  end
90
98
  end
91
99
 
92
100
  # Show invalid properties with the reasons. Usually used together with valid?
93
101
  # @return Array for valid properties with the reasons
94
102
  def list_invalid_properties
103
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
95
104
  invalid_properties = Array.new
96
105
  if @recordings.nil?
97
106
  invalid_properties.push('invalid value for "recordings", recordings cannot be nil.')
@@ -115,6 +124,7 @@ module SongtradrApiClientRuby
115
124
  # Check to see if the all the properties in the model are valid
116
125
  # @return true if the model is valid
117
126
  def valid?
127
+ warn '[DEPRECATED] the `valid?` method is obsolete'
118
128
  return false if @recordings.nil?
119
129
  return false if @has_next_page.nil?
120
130
  return false if @current_page_number.nil?
@@ -149,37 +159,30 @@ module SongtradrApiClientRuby
149
159
  # @param [Hash] attributes Model attributes in the form of hash
150
160
  # @return [Object] Returns the model itself
151
161
  def self.build_from_hash(attributes)
152
- new.build_from_hash(attributes)
153
- end
154
-
155
- # Builds the object from hash
156
- # @param [Hash] attributes Model attributes in the form of hash
157
- # @return [Object] Returns the model itself
158
- def build_from_hash(attributes)
159
162
  return nil unless attributes.is_a?(Hash)
160
163
  attributes = attributes.transform_keys(&:to_sym)
161
- self.class.openapi_types.each_pair do |key, type|
162
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
163
- self.send("#{key}=", nil)
164
+ transformed_hash = {}
165
+ openapi_types.each_pair do |key, type|
166
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
167
+ transformed_hash["#{key}"] = nil
164
168
  elsif type =~ /\AArray<(.*)>/i
165
169
  # check to ensure the input is an array given that the attribute
166
170
  # is documented as an array but the input is not
167
- if attributes[self.class.attribute_map[key]].is_a?(Array)
168
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
171
+ if attributes[attribute_map[key]].is_a?(Array)
172
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
169
173
  end
170
- elsif !attributes[self.class.attribute_map[key]].nil?
171
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
174
+ elsif !attributes[attribute_map[key]].nil?
175
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
172
176
  end
173
177
  end
174
-
175
- self
178
+ new(transformed_hash)
176
179
  end
177
180
 
178
181
  # Deserializes the data based on type
179
182
  # @param string type Data type
180
183
  # @param string value Value to be deserialized
181
184
  # @return [Object] Deserialized data
182
- def _deserialize(type, value)
185
+ def self._deserialize(type, value)
183
186
  case type.to_sym
184
187
  when :Time
185
188
  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.12.23
6
+ The version of the OpenAPI document: 1.12.24
7
7
  Contact: info@songtradr.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 7.0.0-SNAPSHOT
@@ -16,9 +16,7 @@ require 'time'
16
16
  module SongtradrApiClientRuby
17
17
  # Recording with a mid-sized field set.
18
18
  class RecordingMediumDTO
19
- attr_accessor :spotify_id
20
-
21
- attr_accessor :genre_predictions
19
+ attr_accessor :isrc
22
20
 
23
21
  attr_accessor :recording_party_entities
24
22
 
@@ -34,13 +32,14 @@ module SongtradrApiClientRuby
34
32
 
35
33
  attr_accessor :tags
36
34
 
37
- attr_accessor :isrc
35
+ attr_accessor :spotify_id
36
+
37
+ attr_accessor :genre_predictions
38
38
 
39
39
  # Attribute mapping from ruby-style variable name to JSON key.
40
40
  def self.attribute_map
41
41
  {
42
- :'spotify_id' => :'spotifyId',
43
- :'genre_predictions' => :'genrePredictions',
42
+ :'isrc' => :'isrc',
44
43
  :'recording_party_entities' => :'recordingPartyEntities',
45
44
  :'genres' => :'genres',
46
45
  :'language_of_performance' => :'languageOfPerformance',
@@ -48,7 +47,8 @@ module SongtradrApiClientRuby
48
47
  :'titles' => :'titles',
49
48
  :'musical_features' => :'musicalFeatures',
50
49
  :'tags' => :'tags',
51
- :'isrc' => :'isrc'
50
+ :'spotify_id' => :'spotifyId',
51
+ :'genre_predictions' => :'genrePredictions'
52
52
  }
53
53
  end
54
54
 
@@ -60,8 +60,7 @@ module SongtradrApiClientRuby
60
60
  # Attribute type mapping.
61
61
  def self.openapi_types
62
62
  {
63
- :'spotify_id' => :'String',
64
- :'genre_predictions' => :'Array<RecordingGenrePredictionDTO>',
63
+ :'isrc' => :'String',
65
64
  :'recording_party_entities' => :'Array<RecordingPartyDTO>',
66
65
  :'genres' => :'Array<GenreDTO>',
67
66
  :'language_of_performance' => :'String',
@@ -69,7 +68,8 @@ module SongtradrApiClientRuby
69
68
  :'titles' => :'Array<TitleDTO>',
70
69
  :'musical_features' => :'MusicalFeaturesDTO',
71
70
  :'tags' => :'Array<RecordingTagSmallDTO>',
72
- :'isrc' => :'String'
71
+ :'spotify_id' => :'String',
72
+ :'genre_predictions' => :'Array<RecordingGenrePredictionDTO>'
73
73
  }
74
74
  end
75
75
 
@@ -94,14 +94,10 @@ module SongtradrApiClientRuby
94
94
  h[k.to_sym] = v
95
95
  }
96
96
 
97
- if attributes.key?(:'spotify_id')
98
- self.spotify_id = attributes[:'spotify_id']
99
- end
100
-
101
- if attributes.key?(:'genre_predictions')
102
- if (value = attributes[:'genre_predictions']).is_a?(Array)
103
- self.genre_predictions = value
104
- end
97
+ if attributes.key?(:'isrc')
98
+ self.isrc = attributes[:'isrc']
99
+ else
100
+ self.isrc = nil
105
101
  end
106
102
 
107
103
  if attributes.key?(:'recording_party_entities')
@@ -140,14 +136,21 @@ module SongtradrApiClientRuby
140
136
  end
141
137
  end
142
138
 
143
- if attributes.key?(:'isrc')
144
- self.isrc = attributes[:'isrc']
139
+ if attributes.key?(:'spotify_id')
140
+ self.spotify_id = attributes[:'spotify_id']
141
+ end
142
+
143
+ if attributes.key?(:'genre_predictions')
144
+ if (value = attributes[:'genre_predictions']).is_a?(Array)
145
+ self.genre_predictions = value
146
+ end
145
147
  end
146
148
  end
147
149
 
148
150
  # Show invalid properties with the reasons. Usually used together with valid?
149
151
  # @return Array for valid properties with the reasons
150
152
  def list_invalid_properties
153
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
151
154
  invalid_properties = Array.new
152
155
  if @isrc.nil?
153
156
  invalid_properties.push('invalid value for "isrc", isrc cannot be nil.')
@@ -159,41 +162,57 @@ module SongtradrApiClientRuby
159
162
  # Check to see if the all the properties in the model are valid
160
163
  # @return true if the model is valid
161
164
  def valid?
165
+ warn '[DEPRECATED] the `valid?` method is obsolete'
162
166
  return false if @isrc.nil?
163
167
  true
164
168
  end
165
169
 
166
- # Custom attribute writer method with validation
167
- # @param [Object] genre_predictions Value to be assigned
168
- def genre_predictions=(genre_predictions)
169
- @genre_predictions = genre_predictions
170
- end
171
-
172
170
  # Custom attribute writer method with validation
173
171
  # @param [Object] recording_party_entities Value to be assigned
174
172
  def recording_party_entities=(recording_party_entities)
173
+ if recording_party_entities.nil?
174
+ fail ArgumentError, 'recording_party_entities cannot be nil'
175
+ end
176
+
175
177
  @recording_party_entities = recording_party_entities
176
178
  end
177
179
 
178
180
  # Custom attribute writer method with validation
179
181
  # @param [Object] genres Value to be assigned
180
182
  def genres=(genres)
183
+ if genres.nil?
184
+ fail ArgumentError, 'genres cannot be nil'
185
+ end
186
+
181
187
  @genres = genres
182
188
  end
183
189
 
184
190
  # Custom attribute writer method with validation
185
191
  # @param [Object] titles Value to be assigned
186
192
  def titles=(titles)
193
+ if titles.nil?
194
+ fail ArgumentError, 'titles cannot be nil'
195
+ end
196
+
187
197
  @titles = titles
188
198
  end
189
199
 
200
+ # Custom attribute writer method with validation
201
+ # @param [Object] genre_predictions Value to be assigned
202
+ def genre_predictions=(genre_predictions)
203
+ if genre_predictions.nil?
204
+ fail ArgumentError, 'genre_predictions cannot be nil'
205
+ end
206
+
207
+ @genre_predictions = genre_predictions
208
+ end
209
+
190
210
  # Checks equality by comparing each attribute.
191
211
  # @param [Object] Object to be compared
192
212
  def ==(o)
193
213
  return true if self.equal?(o)
194
214
  self.class == o.class &&
195
- spotify_id == o.spotify_id &&
196
- genre_predictions == o.genre_predictions &&
215
+ isrc == o.isrc &&
197
216
  recording_party_entities == o.recording_party_entities &&
198
217
  genres == o.genres &&
199
218
  language_of_performance == o.language_of_performance &&
@@ -201,7 +220,8 @@ module SongtradrApiClientRuby
201
220
  titles == o.titles &&
202
221
  musical_features == o.musical_features &&
203
222
  tags == o.tags &&
204
- isrc == o.isrc
223
+ spotify_id == o.spotify_id &&
224
+ genre_predictions == o.genre_predictions
205
225
  end
206
226
 
207
227
  # @see the `==` method
@@ -213,44 +233,37 @@ module SongtradrApiClientRuby
213
233
  # Calculates hash code according to all attributes.
214
234
  # @return [Integer] Hash code
215
235
  def hash
216
- [spotify_id, genre_predictions, recording_party_entities, genres, language_of_performance, release_date, titles, musical_features, tags, isrc].hash
236
+ [isrc, recording_party_entities, genres, language_of_performance, release_date, titles, musical_features, tags, spotify_id, genre_predictions].hash
217
237
  end
218
238
 
219
239
  # Builds the object from hash
220
240
  # @param [Hash] attributes Model attributes in the form of hash
221
241
  # @return [Object] Returns the model itself
222
242
  def self.build_from_hash(attributes)
223
- new.build_from_hash(attributes)
224
- end
225
-
226
- # Builds the object from hash
227
- # @param [Hash] attributes Model attributes in the form of hash
228
- # @return [Object] Returns the model itself
229
- def build_from_hash(attributes)
230
243
  return nil unless attributes.is_a?(Hash)
231
244
  attributes = attributes.transform_keys(&:to_sym)
232
- self.class.openapi_types.each_pair do |key, type|
233
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
234
- self.send("#{key}=", nil)
245
+ transformed_hash = {}
246
+ openapi_types.each_pair do |key, type|
247
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
248
+ transformed_hash["#{key}"] = nil
235
249
  elsif type =~ /\AArray<(.*)>/i
236
250
  # check to ensure the input is an array given that the attribute
237
251
  # is documented as an array but the input is not
238
- if attributes[self.class.attribute_map[key]].is_a?(Array)
239
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
252
+ if attributes[attribute_map[key]].is_a?(Array)
253
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
240
254
  end
241
- elsif !attributes[self.class.attribute_map[key]].nil?
242
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
255
+ elsif !attributes[attribute_map[key]].nil?
256
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
243
257
  end
244
258
  end
245
-
246
- self
259
+ new(transformed_hash)
247
260
  end
248
261
 
249
262
  # Deserializes the data based on type
250
263
  # @param string type Data type
251
264
  # @param string value Value to be deserialized
252
265
  # @return [Object] Deserialized data
253
- def _deserialize(type, value)
266
+ def self._deserialize(type, value)
254
267
  case type.to_sym
255
268
  when :Time
256
269
  Time.parse(value)