songtradr_api_client_ruby 1.12.23 → 1.13.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (177) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +2 -2
  3. data/README.md +6 -5
  4. data/docs/AllowedValuesApi.md +2 -2
  5. data/docs/ApiKeyDTO.md +2 -2
  6. data/docs/CategoryMediumDTO.md +3 -3
  7. data/docs/FileSmallDTO.md +3 -3
  8. data/docs/MusicalFeaturesDTO.md +38 -38
  9. data/docs/PlaylistLargeDTO.md +2 -2
  10. data/docs/ProductMediumDTO.md +4 -4
  11. data/docs/RecordingApi.md +6 -0
  12. data/docs/RecordingLargeDTO.md +5 -5
  13. data/docs/RecordingMediumDTO.md +5 -3
  14. data/docs/RecordingMinimalWithMusicalFeaturesDTO.md +3 -3
  15. data/docs/RecordingSmallDTO.md +3 -3
  16. data/docs/TrackDTO.md +18 -0
  17. data/docs/UserApi.md +4 -0
  18. data/docs/UserDTO.md +18 -0
  19. data/lib/songtradr_api_client_ruby/api/allowed_values_api.rb +4 -4
  20. data/lib/songtradr_api_client_ruby/api/api_keys_api.rb +1 -1
  21. data/lib/songtradr_api_client_ruby/api/party_api.rb +1 -1
  22. data/lib/songtradr_api_client_ruby/api/playlist_api.rb +1 -1
  23. data/lib/songtradr_api_client_ruby/api/recording_api.rb +10 -1
  24. data/lib/songtradr_api_client_ruby/api/user_api.rb +7 -1
  25. data/lib/songtradr_api_client_ruby/api_client.rb +1 -1
  26. data/lib/songtradr_api_client_ruby/api_error.rb +1 -1
  27. data/lib/songtradr_api_client_ruby/configuration.rb +10 -8
  28. data/lib/songtradr_api_client_ruby/models/admin_api_user_dto.rb +13 -18
  29. data/lib/songtradr_api_client_ruby/models/api_key_dto.rb +29 -28
  30. data/lib/songtradr_api_client_ruby/models/category_medium_dto.rb +30 -31
  31. data/lib/songtradr_api_client_ruby/models/category_minimal_dto.rb +15 -18
  32. data/lib/songtradr_api_client_ruby/models/config_access_dto.rb +17 -18
  33. data/lib/songtradr_api_client_ruby/models/config_identifier_dto.rb +17 -18
  34. data/lib/songtradr_api_client_ruby/models/contributor_type_dto.rb +15 -18
  35. data/lib/songtradr_api_client_ruby/models/create_api_key_dto.rb +13 -18
  36. data/lib/songtradr_api_client_ruby/models/error_response.rb +19 -18
  37. data/lib/songtradr_api_client_ruby/models/field_summary_dto.rb +19 -18
  38. data/lib/songtradr_api_client_ruby/models/file_dto.rb +23 -18
  39. data/lib/songtradr_api_client_ruby/models/file_list_dto.rb +21 -18
  40. data/lib/songtradr_api_client_ruby/models/file_minimal_with_url_dto.rb +19 -18
  41. data/lib/songtradr_api_client_ruby/models/file_small_dto.rb +41 -36
  42. data/lib/songtradr_api_client_ruby/models/file_upload_dto.rb +13 -18
  43. data/lib/songtradr_api_client_ruby/models/file_w_ith_url_dto.rb +17 -18
  44. data/lib/songtradr_api_client_ruby/models/files_summary_dto.rb +15 -18
  45. data/lib/songtradr_api_client_ruby/models/forgot_password_dto.rb +15 -18
  46. data/lib/songtradr_api_client_ruby/models/genre_dto.rb +17 -18
  47. data/lib/songtradr_api_client_ruby/models/genre_minimal_dto.rb +15 -18
  48. data/lib/songtradr_api_client_ruby/models/genres_summary_dto.rb +17 -18
  49. data/lib/songtradr_api_client_ruby/models/init_put_recording_audio_dto.rb +13 -18
  50. data/lib/songtradr_api_client_ruby/models/jwt_token_dto.rb +17 -18
  51. data/lib/songtradr_api_client_ruby/models/login_dto.rb +17 -18
  52. data/lib/songtradr_api_client_ruby/models/musical_features_dto.rb +354 -359
  53. data/lib/songtradr_api_client_ruby/models/p_line_dto.rb +15 -18
  54. data/lib/songtradr_api_client_ruby/models/party_large_dto.rb +15 -18
  55. data/lib/songtradr_api_client_ruby/models/party_small_dto.rb +17 -18
  56. data/lib/songtradr_api_client_ruby/models/playlist_large_dto.rb +25 -28
  57. data/lib/songtradr_api_client_ruby/models/product_medium_dto.rb +46 -39
  58. data/lib/songtradr_api_client_ruby/models/product_party_dto.rb +15 -18
  59. data/lib/songtradr_api_client_ruby/models/recording_for_similarity_search_dto.rb +17 -18
  60. data/lib/songtradr_api_client_ruby/models/recording_genre_prediction_dto.rb +19 -18
  61. data/lib/songtradr_api_client_ruby/models/recording_large_dto.rb +57 -40
  62. data/lib/songtradr_api_client_ruby/models/recording_list_dto.rb +21 -18
  63. data/lib/songtradr_api_client_ruby/models/recording_medium_dto.rb +55 -31
  64. data/lib/songtradr_api_client_ruby/models/recording_minimal_with_musical_features_dto.rb +28 -31
  65. data/lib/songtradr_api_client_ruby/models/recording_minimal_with_taggrams_dto.rb +15 -18
  66. data/lib/songtradr_api_client_ruby/models/recording_minimal_with_tagstrengths_dto.rb +15 -18
  67. data/lib/songtradr_api_client_ruby/models/recording_party_dto.rb +15 -18
  68. data/lib/songtradr_api_client_ruby/models/recording_playlist_dto.rb +13 -18
  69. data/lib/songtradr_api_client_ruby/models/recording_small_dto.rb +36 -31
  70. data/lib/songtradr_api_client_ruby/models/recording_tag_small_dto.rb +15 -18
  71. data/lib/songtradr_api_client_ruby/models/save_file_recording_dto.rb +17 -18
  72. data/lib/songtradr_api_client_ruby/models/save_playlist_dto.rb +21 -18
  73. data/lib/songtradr_api_client_ruby/models/save_recording_genre_dto.rb +15 -18
  74. data/lib/songtradr_api_client_ruby/models/save_recording_party_dto.rb +17 -18
  75. data/lib/songtradr_api_client_ruby/models/save_recording_playlist_dto.rb +17 -18
  76. data/lib/songtradr_api_client_ruby/models/save_recording_tag_dto.rb +15 -18
  77. data/lib/songtradr_api_client_ruby/models/save_referrer_dto.rb +13 -18
  78. data/lib/songtradr_api_client_ruby/models/save_taggrams_dto.rb +13 -18
  79. data/lib/songtradr_api_client_ruby/models/save_user_dto.rb +15 -18
  80. data/lib/songtradr_api_client_ruby/models/search_filter_values_dto.rb +95 -18
  81. data/lib/songtradr_api_client_ruby/models/search_recording_granular_abstraction_dto.rb +15 -18
  82. data/lib/songtradr_api_client_ruby/models/search_recording_granular_dto.rb +15 -18
  83. data/lib/songtradr_api_client_ruby/models/sign_up_dto.rb +19 -18
  84. data/lib/songtradr_api_client_ruby/models/tag_dto.rb +17 -18
  85. data/lib/songtradr_api_client_ruby/models/tag_small_dto.rb +17 -18
  86. data/lib/songtradr_api_client_ruby/models/taggram_dto.rb +17 -18
  87. data/lib/songtradr_api_client_ruby/models/tags_summary_dto.rb +17 -18
  88. data/lib/songtradr_api_client_ruby/models/tagstrength_dto.rb +17 -18
  89. data/lib/songtradr_api_client_ruby/models/title_dto.rb +15 -18
  90. data/lib/songtradr_api_client_ruby/models/token_request.rb +15 -18
  91. data/lib/songtradr_api_client_ruby/models/track_dto.rb +215 -0
  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 +2 -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 +4 -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 +3 -3
  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 +7 -7
  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 +163 -163
  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 +4 -4
  137. data/spec/models/product_medium_dto_spec.rb +7 -7
  138. data/spec/models/product_party_dto_spec.rb +1 -1
  139. data/spec/models/recording_for_similarity_search_dto_spec.rb +1 -1
  140. data/spec/models/recording_genre_prediction_dto_spec.rb +1 -1
  141. data/spec/models/recording_large_dto_spec.rb +9 -9
  142. data/spec/models/recording_list_dto_spec.rb +1 -1
  143. data/spec/models/recording_medium_dto_spec.rb +10 -4
  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 +1 -1
  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_dto_spec.rb +34 -0
  172. data/spec/models/track_to_medium_product_dto_spec.rb +1 -1
  173. data/spec/models/update_password_dto_spec.rb +1 -1
  174. data/spec/models/usage_dto_spec.rb +1 -1
  175. data/spec/models/user_dto_spec.rb +55 -1
  176. data/spec/spec_helper.rb +1 -1
  177. 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.12.23
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
@@ -20,6 +20,8 @@ module SongtradrApiClientRuby
20
20
 
21
21
  attr_accessor :genre_predictions
22
22
 
23
+ attr_accessor :isrc
24
+
23
25
  attr_accessor :recording_party_entities
24
26
 
25
27
  attr_accessor :genres
@@ -30,25 +32,26 @@ module SongtradrApiClientRuby
30
32
 
31
33
  attr_accessor :titles
32
34
 
35
+ attr_accessor :tracks
36
+
33
37
  attr_accessor :musical_features
34
38
 
35
39
  attr_accessor :tags
36
40
 
37
- attr_accessor :isrc
38
-
39
41
  # Attribute mapping from ruby-style variable name to JSON key.
40
42
  def self.attribute_map
41
43
  {
42
44
  :'spotify_id' => :'spotifyId',
43
45
  :'genre_predictions' => :'genrePredictions',
46
+ :'isrc' => :'isrc',
44
47
  :'recording_party_entities' => :'recordingPartyEntities',
45
48
  :'genres' => :'genres',
46
49
  :'language_of_performance' => :'languageOfPerformance',
47
50
  :'release_date' => :'releaseDate',
48
51
  :'titles' => :'titles',
52
+ :'tracks' => :'tracks',
49
53
  :'musical_features' => :'musicalFeatures',
50
- :'tags' => :'tags',
51
- :'isrc' => :'isrc'
54
+ :'tags' => :'tags'
52
55
  }
53
56
  end
54
57
 
@@ -62,14 +65,15 @@ module SongtradrApiClientRuby
62
65
  {
63
66
  :'spotify_id' => :'String',
64
67
  :'genre_predictions' => :'Array<RecordingGenrePredictionDTO>',
68
+ :'isrc' => :'String',
65
69
  :'recording_party_entities' => :'Array<RecordingPartyDTO>',
66
70
  :'genres' => :'Array<GenreDTO>',
67
71
  :'language_of_performance' => :'String',
68
72
  :'release_date' => :'Time',
69
73
  :'titles' => :'Array<TitleDTO>',
74
+ :'tracks' => :'Array<TrackDTO>',
70
75
  :'musical_features' => :'MusicalFeaturesDTO',
71
- :'tags' => :'Array<RecordingTagSmallDTO>',
72
- :'isrc' => :'String'
76
+ :'tags' => :'Array<RecordingTagSmallDTO>'
73
77
  }
74
78
  end
75
79
 
@@ -104,6 +108,12 @@ module SongtradrApiClientRuby
104
108
  end
105
109
  end
106
110
 
111
+ if attributes.key?(:'isrc')
112
+ self.isrc = attributes[:'isrc']
113
+ else
114
+ self.isrc = nil
115
+ end
116
+
107
117
  if attributes.key?(:'recording_party_entities')
108
118
  if (value = attributes[:'recording_party_entities']).is_a?(Array)
109
119
  self.recording_party_entities = value
@@ -130,6 +140,12 @@ module SongtradrApiClientRuby
130
140
  end
131
141
  end
132
142
 
143
+ if attributes.key?(:'tracks')
144
+ if (value = attributes[:'tracks']).is_a?(Array)
145
+ self.tracks = value
146
+ end
147
+ end
148
+
133
149
  if attributes.key?(:'musical_features')
134
150
  self.musical_features = attributes[:'musical_features']
135
151
  end
@@ -139,15 +155,12 @@ module SongtradrApiClientRuby
139
155
  self.tags = value
140
156
  end
141
157
  end
142
-
143
- if attributes.key?(:'isrc')
144
- self.isrc = attributes[:'isrc']
145
- end
146
158
  end
147
159
 
148
160
  # Show invalid properties with the reasons. Usually used together with valid?
149
161
  # @return Array for valid properties with the reasons
150
162
  def list_invalid_properties
163
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
151
164
  invalid_properties = Array.new
152
165
  if @isrc.nil?
153
166
  invalid_properties.push('invalid value for "isrc", isrc cannot be nil.')
@@ -159,6 +172,7 @@ module SongtradrApiClientRuby
159
172
  # Check to see if the all the properties in the model are valid
160
173
  # @return true if the model is valid
161
174
  def valid?
175
+ warn '[DEPRECATED] the `valid?` method is obsolete'
162
176
  return false if @isrc.nil?
163
177
  true
164
178
  end
@@ -166,24 +180,40 @@ module SongtradrApiClientRuby
166
180
  # Custom attribute writer method with validation
167
181
  # @param [Object] genre_predictions Value to be assigned
168
182
  def genre_predictions=(genre_predictions)
183
+ if genre_predictions.nil?
184
+ fail ArgumentError, 'genre_predictions cannot be nil'
185
+ end
186
+
169
187
  @genre_predictions = genre_predictions
170
188
  end
171
189
 
172
190
  # Custom attribute writer method with validation
173
191
  # @param [Object] recording_party_entities Value to be assigned
174
192
  def recording_party_entities=(recording_party_entities)
193
+ if recording_party_entities.nil?
194
+ fail ArgumentError, 'recording_party_entities cannot be nil'
195
+ end
196
+
175
197
  @recording_party_entities = recording_party_entities
176
198
  end
177
199
 
178
200
  # Custom attribute writer method with validation
179
201
  # @param [Object] genres Value to be assigned
180
202
  def genres=(genres)
203
+ if genres.nil?
204
+ fail ArgumentError, 'genres cannot be nil'
205
+ end
206
+
181
207
  @genres = genres
182
208
  end
183
209
 
184
210
  # Custom attribute writer method with validation
185
211
  # @param [Object] titles Value to be assigned
186
212
  def titles=(titles)
213
+ if titles.nil?
214
+ fail ArgumentError, 'titles cannot be nil'
215
+ end
216
+
187
217
  @titles = titles
188
218
  end
189
219
 
@@ -194,14 +224,15 @@ module SongtradrApiClientRuby
194
224
  self.class == o.class &&
195
225
  spotify_id == o.spotify_id &&
196
226
  genre_predictions == o.genre_predictions &&
227
+ isrc == o.isrc &&
197
228
  recording_party_entities == o.recording_party_entities &&
198
229
  genres == o.genres &&
199
230
  language_of_performance == o.language_of_performance &&
200
231
  release_date == o.release_date &&
201
232
  titles == o.titles &&
233
+ tracks == o.tracks &&
202
234
  musical_features == o.musical_features &&
203
- tags == o.tags &&
204
- isrc == o.isrc
235
+ tags == o.tags
205
236
  end
206
237
 
207
238
  # @see the `==` method
@@ -213,44 +244,37 @@ module SongtradrApiClientRuby
213
244
  # Calculates hash code according to all attributes.
214
245
  # @return [Integer] Hash code
215
246
  def hash
216
- [spotify_id, genre_predictions, recording_party_entities, genres, language_of_performance, release_date, titles, musical_features, tags, isrc].hash
247
+ [spotify_id, genre_predictions, isrc, recording_party_entities, genres, language_of_performance, release_date, titles, tracks, musical_features, tags].hash
217
248
  end
218
249
 
219
250
  # Builds the object from hash
220
251
  # @param [Hash] attributes Model attributes in the form of hash
221
252
  # @return [Object] Returns the model itself
222
253
  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
254
  return nil unless attributes.is_a?(Hash)
231
255
  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)
256
+ transformed_hash = {}
257
+ openapi_types.each_pair do |key, type|
258
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
259
+ transformed_hash["#{key}"] = nil
235
260
  elsif type =~ /\AArray<(.*)>/i
236
261
  # check to ensure the input is an array given that the attribute
237
262
  # 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) })
263
+ if attributes[attribute_map[key]].is_a?(Array)
264
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
240
265
  end
241
- elsif !attributes[self.class.attribute_map[key]].nil?
242
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
266
+ elsif !attributes[attribute_map[key]].nil?
267
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
243
268
  end
244
269
  end
245
-
246
- self
270
+ new(transformed_hash)
247
271
  end
248
272
 
249
273
  # Deserializes the data based on type
250
274
  # @param string type Data type
251
275
  # @param string value Value to be deserialized
252
276
  # @return [Object] Deserialized data
253
- def _deserialize(type, value)
277
+ def self._deserialize(type, value)
254
278
  case type.to_sym
255
279
  when :Time
256
280
  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.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
@@ -16,15 +16,15 @@ require 'time'
16
16
  module SongtradrApiClientRuby
17
17
  # Recording in its minimal form, but with AI-predicted musical features.
18
18
  class RecordingMinimalWithMusicalFeaturesDTO
19
- attr_accessor :musical_features
20
-
21
19
  attr_accessor :isrc
22
20
 
21
+ attr_accessor :musical_features
22
+
23
23
  # Attribute mapping from ruby-style variable name to JSON key.
24
24
  def self.attribute_map
25
25
  {
26
- :'musical_features' => :'musicalFeatures',
27
- :'isrc' => :'isrc'
26
+ :'isrc' => :'isrc',
27
+ :'musical_features' => :'musicalFeatures'
28
28
  }
29
29
  end
30
30
 
@@ -36,8 +36,8 @@ module SongtradrApiClientRuby
36
36
  # Attribute type mapping.
37
37
  def self.openapi_types
38
38
  {
39
- :'musical_features' => :'Array<MusicalFeaturesDTO>',
40
- :'isrc' => :'String'
39
+ :'isrc' => :'String',
40
+ :'musical_features' => :'Array<MusicalFeaturesDTO>'
41
41
  }
42
42
  end
43
43
 
@@ -62,20 +62,23 @@ module SongtradrApiClientRuby
62
62
  h[k.to_sym] = v
63
63
  }
64
64
 
65
+ if attributes.key?(:'isrc')
66
+ self.isrc = attributes[:'isrc']
67
+ else
68
+ self.isrc = nil
69
+ end
70
+
65
71
  if attributes.key?(:'musical_features')
66
72
  if (value = attributes[:'musical_features']).is_a?(Array)
67
73
  self.musical_features = value
68
74
  end
69
75
  end
70
-
71
- if attributes.key?(:'isrc')
72
- self.isrc = attributes[:'isrc']
73
- end
74
76
  end
75
77
 
76
78
  # Show invalid properties with the reasons. Usually used together with valid?
77
79
  # @return Array for valid properties with the reasons
78
80
  def list_invalid_properties
81
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
79
82
  invalid_properties = Array.new
80
83
  if @isrc.nil?
81
84
  invalid_properties.push('invalid value for "isrc", isrc cannot be nil.')
@@ -87,6 +90,7 @@ module SongtradrApiClientRuby
87
90
  # Check to see if the all the properties in the model are valid
88
91
  # @return true if the model is valid
89
92
  def valid?
93
+ warn '[DEPRECATED] the `valid?` method is obsolete'
90
94
  return false if @isrc.nil?
91
95
  true
92
96
  end
@@ -96,8 +100,8 @@ module SongtradrApiClientRuby
96
100
  def ==(o)
97
101
  return true if self.equal?(o)
98
102
  self.class == o.class &&
99
- musical_features == o.musical_features &&
100
- isrc == o.isrc
103
+ isrc == o.isrc &&
104
+ musical_features == o.musical_features
101
105
  end
102
106
 
103
107
  # @see the `==` method
@@ -109,44 +113,37 @@ module SongtradrApiClientRuby
109
113
  # Calculates hash code according to all attributes.
110
114
  # @return [Integer] Hash code
111
115
  def hash
112
- [musical_features, isrc].hash
116
+ [isrc, musical_features].hash
113
117
  end
114
118
 
115
119
  # Builds the object from hash
116
120
  # @param [Hash] attributes Model attributes in the form of hash
117
121
  # @return [Object] Returns the model itself
118
122
  def self.build_from_hash(attributes)
119
- new.build_from_hash(attributes)
120
- end
121
-
122
- # Builds the object from hash
123
- # @param [Hash] attributes Model attributes in the form of hash
124
- # @return [Object] Returns the model itself
125
- def build_from_hash(attributes)
126
123
  return nil unless attributes.is_a?(Hash)
127
124
  attributes = attributes.transform_keys(&:to_sym)
128
- self.class.openapi_types.each_pair do |key, type|
129
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
130
- self.send("#{key}=", nil)
125
+ transformed_hash = {}
126
+ openapi_types.each_pair do |key, type|
127
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
128
+ transformed_hash["#{key}"] = nil
131
129
  elsif type =~ /\AArray<(.*)>/i
132
130
  # check to ensure the input is an array given that the attribute
133
131
  # is documented as an array but the input is not
134
- if attributes[self.class.attribute_map[key]].is_a?(Array)
135
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
132
+ if attributes[attribute_map[key]].is_a?(Array)
133
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
136
134
  end
137
- elsif !attributes[self.class.attribute_map[key]].nil?
138
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
135
+ elsif !attributes[attribute_map[key]].nil?
136
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
139
137
  end
140
138
  end
141
-
142
- self
139
+ new(transformed_hash)
143
140
  end
144
141
 
145
142
  # Deserializes the data based on type
146
143
  # @param string type Data type
147
144
  # @param string value Value to be deserialized
148
145
  # @return [Object] Deserialized data
149
- def _deserialize(type, value)
146
+ def self._deserialize(type, value)
150
147
  case type.to_sym
151
148
  when :Time
152
149
  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.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,6 +69,8 @@ module SongtradrApiClientRuby
69
69
 
70
70
  if attributes.key?(:'isrc')
71
71
  self.isrc = attributes[:'isrc']
72
+ else
73
+ self.isrc = nil
72
74
  end
73
75
 
74
76
  if attributes.key?(:'timestamps')
@@ -87,6 +89,7 @@ module SongtradrApiClientRuby
87
89
  # Show invalid properties with the reasons. Usually used together with valid?
88
90
  # @return Array for valid properties with the reasons
89
91
  def list_invalid_properties
92
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
90
93
  invalid_properties = Array.new
91
94
  if @isrc.nil?
92
95
  invalid_properties.push('invalid value for "isrc", isrc cannot be nil.')
@@ -98,6 +101,7 @@ module SongtradrApiClientRuby
98
101
  # Check to see if the all the properties in the model are valid
99
102
  # @return true if the model is valid
100
103
  def valid?
104
+ warn '[DEPRECATED] the `valid?` method is obsolete'
101
105
  return false if @isrc.nil?
102
106
  true
103
107
  end
@@ -128,37 +132,30 @@ module SongtradrApiClientRuby
128
132
  # @param [Hash] attributes Model attributes in the form of hash
129
133
  # @return [Object] Returns the model itself
130
134
  def self.build_from_hash(attributes)
131
- new.build_from_hash(attributes)
132
- end
133
-
134
- # Builds the object from hash
135
- # @param [Hash] attributes Model attributes in the form of hash
136
- # @return [Object] Returns the model itself
137
- def build_from_hash(attributes)
138
135
  return nil unless attributes.is_a?(Hash)
139
136
  attributes = attributes.transform_keys(&:to_sym)
140
- self.class.openapi_types.each_pair do |key, type|
141
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
142
- self.send("#{key}=", nil)
137
+ transformed_hash = {}
138
+ openapi_types.each_pair do |key, type|
139
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
140
+ transformed_hash["#{key}"] = nil
143
141
  elsif type =~ /\AArray<(.*)>/i
144
142
  # check to ensure the input is an array given that the attribute
145
143
  # is documented as an array but the input is not
146
- if attributes[self.class.attribute_map[key]].is_a?(Array)
147
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
144
+ if attributes[attribute_map[key]].is_a?(Array)
145
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
148
146
  end
149
- elsif !attributes[self.class.attribute_map[key]].nil?
150
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
147
+ elsif !attributes[attribute_map[key]].nil?
148
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
151
149
  end
152
150
  end
153
-
154
- self
151
+ new(transformed_hash)
155
152
  end
156
153
 
157
154
  # Deserializes the data based on type
158
155
  # @param string type Data type
159
156
  # @param string value Value to be deserialized
160
157
  # @return [Object] Deserialized data
161
- def _deserialize(type, value)
158
+ def self._deserialize(type, value)
162
159
  case type.to_sym
163
160
  when :Time
164
161
  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.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
@@ -64,6 +64,8 @@ module SongtradrApiClientRuby
64
64
 
65
65
  if attributes.key?(:'isrc')
66
66
  self.isrc = attributes[:'isrc']
67
+ else
68
+ self.isrc = nil
67
69
  end
68
70
 
69
71
  if attributes.key?(:'tagstrengths')
@@ -76,6 +78,7 @@ module SongtradrApiClientRuby
76
78
  # Show invalid properties with the reasons. Usually used together with valid?
77
79
  # @return Array for valid properties with the reasons
78
80
  def list_invalid_properties
81
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
79
82
  invalid_properties = Array.new
80
83
  if @isrc.nil?
81
84
  invalid_properties.push('invalid value for "isrc", isrc cannot be nil.')
@@ -87,6 +90,7 @@ module SongtradrApiClientRuby
87
90
  # Check to see if the all the properties in the model are valid
88
91
  # @return true if the model is valid
89
92
  def valid?
93
+ warn '[DEPRECATED] the `valid?` method is obsolete'
90
94
  return false if @isrc.nil?
91
95
  true
92
96
  end
@@ -116,37 +120,30 @@ module SongtradrApiClientRuby
116
120
  # @param [Hash] attributes Model attributes in the form of hash
117
121
  # @return [Object] Returns the model itself
118
122
  def self.build_from_hash(attributes)
119
- new.build_from_hash(attributes)
120
- end
121
-
122
- # Builds the object from hash
123
- # @param [Hash] attributes Model attributes in the form of hash
124
- # @return [Object] Returns the model itself
125
- def build_from_hash(attributes)
126
123
  return nil unless attributes.is_a?(Hash)
127
124
  attributes = attributes.transform_keys(&:to_sym)
128
- self.class.openapi_types.each_pair do |key, type|
129
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
130
- self.send("#{key}=", nil)
125
+ transformed_hash = {}
126
+ openapi_types.each_pair do |key, type|
127
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
128
+ transformed_hash["#{key}"] = nil
131
129
  elsif type =~ /\AArray<(.*)>/i
132
130
  # check to ensure the input is an array given that the attribute
133
131
  # is documented as an array but the input is not
134
- if attributes[self.class.attribute_map[key]].is_a?(Array)
135
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
132
+ if attributes[attribute_map[key]].is_a?(Array)
133
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
136
134
  end
137
- elsif !attributes[self.class.attribute_map[key]].nil?
138
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
135
+ elsif !attributes[attribute_map[key]].nil?
136
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
139
137
  end
140
138
  end
141
-
142
- self
139
+ new(transformed_hash)
143
140
  end
144
141
 
145
142
  # Deserializes the data based on type
146
143
  # @param string type Data type
147
144
  # @param string value Value to be deserialized
148
145
  # @return [Object] Deserialized data
149
- def _deserialize(type, value)
146
+ def self._deserialize(type, value)
150
147
  case type.to_sym
151
148
  when :Time
152
149
  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.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
@@ -70,12 +70,15 @@ module SongtradrApiClientRuby
70
70
 
71
71
  if attributes.key?(:'party')
72
72
  self.party = attributes[:'party']
73
+ else
74
+ self.party = nil
73
75
  end
74
76
  end
75
77
 
76
78
  # Show invalid properties with the reasons. Usually used together with valid?
77
79
  # @return Array for valid properties with the reasons
78
80
  def list_invalid_properties
81
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
79
82
  invalid_properties = Array.new
80
83
  if @party.nil?
81
84
  invalid_properties.push('invalid value for "party", party cannot be nil.')
@@ -87,6 +90,7 @@ module SongtradrApiClientRuby
87
90
  # Check to see if the all the properties in the model are valid
88
91
  # @return true if the model is valid
89
92
  def valid?
93
+ warn '[DEPRECATED] the `valid?` method is obsolete'
90
94
  return false if @party.nil?
91
95
  true
92
96
  end
@@ -116,37 +120,30 @@ module SongtradrApiClientRuby
116
120
  # @param [Hash] attributes Model attributes in the form of hash
117
121
  # @return [Object] Returns the model itself
118
122
  def self.build_from_hash(attributes)
119
- new.build_from_hash(attributes)
120
- end
121
-
122
- # Builds the object from hash
123
- # @param [Hash] attributes Model attributes in the form of hash
124
- # @return [Object] Returns the model itself
125
- def build_from_hash(attributes)
126
123
  return nil unless attributes.is_a?(Hash)
127
124
  attributes = attributes.transform_keys(&:to_sym)
128
- self.class.openapi_types.each_pair do |key, type|
129
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
130
- self.send("#{key}=", nil)
125
+ transformed_hash = {}
126
+ openapi_types.each_pair do |key, type|
127
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
128
+ transformed_hash["#{key}"] = nil
131
129
  elsif type =~ /\AArray<(.*)>/i
132
130
  # check to ensure the input is an array given that the attribute
133
131
  # is documented as an array but the input is not
134
- if attributes[self.class.attribute_map[key]].is_a?(Array)
135
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
132
+ if attributes[attribute_map[key]].is_a?(Array)
133
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
136
134
  end
137
- elsif !attributes[self.class.attribute_map[key]].nil?
138
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
135
+ elsif !attributes[attribute_map[key]].nil?
136
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
139
137
  end
140
138
  end
141
-
142
- self
139
+ new(transformed_hash)
143
140
  end
144
141
 
145
142
  # Deserializes the data based on type
146
143
  # @param string type Data type
147
144
  # @param string value Value to be deserialized
148
145
  # @return [Object] Deserialized data
149
- def _deserialize(type, value)
146
+ def self._deserialize(type, value)
150
147
  case type.to_sym
151
148
  when :Time
152
149
  Time.parse(value)