songtradr_api_client_ruby 1.12.22 → 1.12.24

Sign up to get free protection for your applications and to get access to all the features.
Files changed (178) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +4 -4
  3. data/README.md +26 -12
  4. data/docs/APIKeysApi.md +217 -0
  5. data/docs/AdminApiUserDTO.md +70 -0
  6. data/docs/AllowedValuesApi.md +2 -2
  7. data/docs/ApiKeyDTO.md +24 -0
  8. data/docs/CreateApiKeyDTO.md +18 -0
  9. data/docs/FileSmallDTO.md +16 -16
  10. data/docs/MusicalFeaturesDTO.md +82 -82
  11. data/docs/PlaylistLargeDTO.md +9 -9
  12. data/docs/ProductMediumDTO.md +2 -2
  13. data/docs/RecordingApi.md +2 -0
  14. data/docs/RecordingGenrePredictionDTO.md +3 -3
  15. data/docs/RecordingLargeDTO.md +11 -11
  16. data/docs/RecordingMediumDTO.md +7 -7
  17. data/docs/RecordingMinimalWithMusicalFeaturesDTO.md +3 -3
  18. data/docs/RecordingPlaylistDTO.md +3 -3
  19. data/docs/RecordingSmallDTO.md +3 -3
  20. data/docs/UserApi.md +4 -0
  21. data/docs/UserDTO.md +20 -0
  22. data/lib/songtradr_api_client_ruby/api/allowed_values_api.rb +4 -4
  23. data/lib/songtradr_api_client_ruby/api/api_keys_api.rb +213 -0
  24. data/lib/songtradr_api_client_ruby/api/party_api.rb +1 -1
  25. data/lib/songtradr_api_client_ruby/api/playlist_api.rb +1 -1
  26. data/lib/songtradr_api_client_ruby/api/recording_api.rb +4 -1
  27. data/lib/songtradr_api_client_ruby/api/user_api.rb +7 -1
  28. data/lib/songtradr_api_client_ruby/api_client.rb +1 -1
  29. data/lib/songtradr_api_client_ruby/api_error.rb +1 -1
  30. data/lib/songtradr_api_client_ruby/configuration.rb +10 -8
  31. data/lib/songtradr_api_client_ruby/models/admin_api_user_dto.rb +448 -0
  32. data/lib/songtradr_api_client_ruby/models/api_key_dto.rb +262 -0
  33. data/lib/songtradr_api_client_ruby/models/category_medium_dto.rb +17 -18
  34. data/lib/songtradr_api_client_ruby/models/category_minimal_dto.rb +15 -18
  35. data/lib/songtradr_api_client_ruby/models/config_access_dto.rb +17 -18
  36. data/lib/songtradr_api_client_ruby/models/config_identifier_dto.rb +17 -18
  37. data/lib/songtradr_api_client_ruby/models/contributor_type_dto.rb +15 -18
  38. data/lib/songtradr_api_client_ruby/models/create_api_key_dto.rb +214 -0
  39. data/lib/songtradr_api_client_ruby/models/error_response.rb +19 -18
  40. data/lib/songtradr_api_client_ruby/models/field_summary_dto.rb +19 -18
  41. data/lib/songtradr_api_client_ruby/models/file_dto.rb +23 -18
  42. data/lib/songtradr_api_client_ruby/models/file_list_dto.rb +21 -18
  43. data/lib/songtradr_api_client_ruby/models/file_minimal_with_url_dto.rb +19 -18
  44. data/lib/songtradr_api_client_ruby/models/file_small_dto.rb +81 -76
  45. data/lib/songtradr_api_client_ruby/models/file_upload_dto.rb +13 -18
  46. data/lib/songtradr_api_client_ruby/models/file_w_ith_url_dto.rb +17 -18
  47. data/lib/songtradr_api_client_ruby/models/files_summary_dto.rb +15 -18
  48. data/lib/songtradr_api_client_ruby/models/forgot_password_dto.rb +15 -18
  49. data/lib/songtradr_api_client_ruby/models/genre_dto.rb +17 -18
  50. data/lib/songtradr_api_client_ruby/models/genre_minimal_dto.rb +15 -18
  51. data/lib/songtradr_api_client_ruby/models/genres_summary_dto.rb +17 -18
  52. data/lib/songtradr_api_client_ruby/models/init_put_recording_audio_dto.rb +13 -18
  53. data/lib/songtradr_api_client_ruby/models/jwt_token_dto.rb +17 -18
  54. data/lib/songtradr_api_client_ruby/models/login_dto.rb +17 -18
  55. data/lib/songtradr_api_client_ruby/models/musical_features_dto.rb +529 -534
  56. data/lib/songtradr_api_client_ruby/models/p_line_dto.rb +15 -18
  57. data/lib/songtradr_api_client_ruby/models/party_large_dto.rb +15 -18
  58. data/lib/songtradr_api_client_ruby/models/party_small_dto.rb +17 -18
  59. data/lib/songtradr_api_client_ruby/models/playlist_large_dto.rb +54 -57
  60. data/lib/songtradr_api_client_ruby/models/product_medium_dto.rb +35 -28
  61. data/lib/songtradr_api_client_ruby/models/product_party_dto.rb +15 -18
  62. data/lib/songtradr_api_client_ruby/models/recording_for_similarity_search_dto.rb +17 -18
  63. data/lib/songtradr_api_client_ruby/models/recording_genre_prediction_dto.rb +37 -36
  64. data/lib/songtradr_api_client_ruby/models/recording_large_dto.rb +94 -77
  65. data/lib/songtradr_api_client_ruby/models/recording_list_dto.rb +21 -18
  66. data/lib/songtradr_api_client_ruby/models/recording_medium_dto.rb +64 -51
  67. data/lib/songtradr_api_client_ruby/models/recording_minimal_with_musical_features_dto.rb +28 -31
  68. data/lib/songtradr_api_client_ruby/models/recording_minimal_with_taggrams_dto.rb +15 -18
  69. data/lib/songtradr_api_client_ruby/models/recording_minimal_with_tagstrengths_dto.rb +15 -18
  70. data/lib/songtradr_api_client_ruby/models/recording_party_dto.rb +15 -18
  71. data/lib/songtradr_api_client_ruby/models/recording_playlist_dto.rb +26 -31
  72. data/lib/songtradr_api_client_ruby/models/recording_small_dto.rb +36 -31
  73. data/lib/songtradr_api_client_ruby/models/recording_tag_small_dto.rb +15 -18
  74. data/lib/songtradr_api_client_ruby/models/save_file_recording_dto.rb +17 -18
  75. data/lib/songtradr_api_client_ruby/models/save_playlist_dto.rb +21 -18
  76. data/lib/songtradr_api_client_ruby/models/save_recording_genre_dto.rb +15 -18
  77. data/lib/songtradr_api_client_ruby/models/save_recording_party_dto.rb +17 -18
  78. data/lib/songtradr_api_client_ruby/models/save_recording_playlist_dto.rb +17 -18
  79. data/lib/songtradr_api_client_ruby/models/save_recording_tag_dto.rb +15 -18
  80. data/lib/songtradr_api_client_ruby/models/save_referrer_dto.rb +13 -18
  81. data/lib/songtradr_api_client_ruby/models/save_taggrams_dto.rb +13 -18
  82. data/lib/songtradr_api_client_ruby/models/save_user_dto.rb +15 -18
  83. data/lib/songtradr_api_client_ruby/models/search_filter_values_dto.rb +95 -18
  84. data/lib/songtradr_api_client_ruby/models/search_recording_granular_abstraction_dto.rb +15 -18
  85. data/lib/songtradr_api_client_ruby/models/search_recording_granular_dto.rb +15 -18
  86. data/lib/songtradr_api_client_ruby/models/sign_up_dto.rb +19 -18
  87. data/lib/songtradr_api_client_ruby/models/tag_dto.rb +17 -18
  88. data/lib/songtradr_api_client_ruby/models/tag_small_dto.rb +17 -18
  89. data/lib/songtradr_api_client_ruby/models/taggram_dto.rb +17 -18
  90. data/lib/songtradr_api_client_ruby/models/tags_summary_dto.rb +17 -18
  91. data/lib/songtradr_api_client_ruby/models/tagstrength_dto.rb +17 -18
  92. data/lib/songtradr_api_client_ruby/models/title_dto.rb +15 -18
  93. data/lib/songtradr_api_client_ruby/models/token_request.rb +15 -18
  94. data/lib/songtradr_api_client_ruby/models/track_to_medium_product_dto.rb +17 -18
  95. data/lib/songtradr_api_client_ruby/models/update_password_dto.rb +17 -18
  96. data/lib/songtradr_api_client_ruby/models/usage_dto.rb +13 -18
  97. data/lib/songtradr_api_client_ruby/models/user_dto.rb +210 -19
  98. data/lib/songtradr_api_client_ruby/version.rb +2 -2
  99. data/lib/songtradr_api_client_ruby.rb +5 -1
  100. data/openapi-generator-config.yaml +1 -1
  101. data/songtradr_api_client_ruby.gemspec +1 -1
  102. data/spec/api/allowed_values_api_spec.rb +2 -2
  103. data/spec/api/api_keys_api_spec.rb +70 -0
  104. data/spec/api/party_api_spec.rb +1 -1
  105. data/spec/api/playlist_api_spec.rb +1 -1
  106. data/spec/api/recording_api_spec.rb +2 -1
  107. data/spec/api/user_api_spec.rb +3 -1
  108. data/spec/api_client_spec.rb +1 -1
  109. data/spec/configuration_spec.rb +1 -1
  110. data/spec/models/admin_api_user_dto_spec.rb +190 -0
  111. data/spec/models/api_key_dto_spec.rb +52 -0
  112. data/spec/models/category_medium_dto_spec.rb +1 -1
  113. data/spec/models/category_minimal_dto_spec.rb +1 -1
  114. data/spec/models/config_access_dto_spec.rb +1 -1
  115. data/spec/models/config_identifier_dto_spec.rb +1 -1
  116. data/spec/models/contributor_type_dto_spec.rb +1 -1
  117. data/spec/models/create_api_key_dto_spec.rb +34 -0
  118. data/spec/models/error_response_spec.rb +1 -1
  119. data/spec/models/field_summary_dto_spec.rb +1 -1
  120. data/spec/models/file_dto_spec.rb +1 -1
  121. data/spec/models/file_list_dto_spec.rb +1 -1
  122. data/spec/models/file_minimal_with_url_dto_spec.rb +1 -1
  123. data/spec/models/file_small_dto_spec.rb +15 -15
  124. data/spec/models/file_upload_dto_spec.rb +1 -1
  125. data/spec/models/file_w_ith_url_dto_spec.rb +1 -1
  126. data/spec/models/files_summary_dto_spec.rb +1 -1
  127. data/spec/models/forgot_password_dto_spec.rb +1 -1
  128. data/spec/models/genre_dto_spec.rb +1 -1
  129. data/spec/models/genre_minimal_dto_spec.rb +1 -1
  130. data/spec/models/genres_summary_dto_spec.rb +1 -1
  131. data/spec/models/init_put_recording_audio_dto_spec.rb +1 -1
  132. data/spec/models/jwt_token_dto_spec.rb +1 -1
  133. data/spec/models/login_dto_spec.rb +1 -1
  134. data/spec/models/musical_features_dto_spec.rb +175 -175
  135. data/spec/models/p_line_dto_spec.rb +1 -1
  136. data/spec/models/party_large_dto_spec.rb +1 -1
  137. data/spec/models/party_small_dto_spec.rb +1 -1
  138. data/spec/models/playlist_large_dto_spec.rb +10 -10
  139. data/spec/models/product_medium_dto_spec.rb +7 -7
  140. data/spec/models/product_party_dto_spec.rb +1 -1
  141. data/spec/models/recording_for_similarity_search_dto_spec.rb +1 -1
  142. data/spec/models/recording_genre_prediction_dto_spec.rb +3 -3
  143. data/spec/models/recording_large_dto_spec.rb +12 -12
  144. data/spec/models/recording_list_dto_spec.rb +1 -1
  145. data/spec/models/recording_medium_dto_spec.rb +9 -9
  146. data/spec/models/recording_minimal_with_musical_features_dto_spec.rb +3 -3
  147. data/spec/models/recording_minimal_with_taggrams_dto_spec.rb +1 -1
  148. data/spec/models/recording_minimal_with_tagstrengths_dto_spec.rb +1 -1
  149. data/spec/models/recording_party_dto_spec.rb +1 -1
  150. data/spec/models/recording_playlist_dto_spec.rb +4 -4
  151. data/spec/models/recording_small_dto_spec.rb +4 -4
  152. data/spec/models/recording_tag_small_dto_spec.rb +1 -1
  153. data/spec/models/save_file_recording_dto_spec.rb +1 -1
  154. data/spec/models/save_playlist_dto_spec.rb +1 -1
  155. data/spec/models/save_recording_genre_dto_spec.rb +1 -1
  156. data/spec/models/save_recording_party_dto_spec.rb +1 -1
  157. data/spec/models/save_recording_playlist_dto_spec.rb +1 -1
  158. data/spec/models/save_recording_tag_dto_spec.rb +1 -1
  159. data/spec/models/save_referrer_dto_spec.rb +1 -1
  160. data/spec/models/save_taggrams_dto_spec.rb +1 -1
  161. data/spec/models/save_user_dto_spec.rb +1 -1
  162. data/spec/models/search_filter_values_dto_spec.rb +1 -1
  163. data/spec/models/search_recording_granular_abstraction_dto_spec.rb +1 -1
  164. data/spec/models/search_recording_granular_dto_spec.rb +1 -1
  165. data/spec/models/sign_up_dto_spec.rb +1 -1
  166. data/spec/models/tag_dto_spec.rb +1 -1
  167. data/spec/models/tag_small_dto_spec.rb +1 -1
  168. data/spec/models/taggram_dto_spec.rb +1 -1
  169. data/spec/models/tags_summary_dto_spec.rb +1 -1
  170. data/spec/models/tagstrength_dto_spec.rb +1 -1
  171. data/spec/models/title_dto_spec.rb +1 -1
  172. data/spec/models/token_request_spec.rb +1 -1
  173. data/spec/models/track_to_medium_product_dto_spec.rb +1 -1
  174. data/spec/models/update_password_dto_spec.rb +1 -1
  175. data/spec/models/usage_dto_spec.rb +1 -1
  176. data/spec/models/user_dto_spec.rb +61 -1
  177. data/spec/spec_helper.rb +1 -1
  178. metadata +72 -56
@@ -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.22
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,13 +18,7 @@ module SongtradrApiClientRuby
18
18
  class RecordingLargeDTO
19
19
  attr_accessor :duration
20
20
 
21
- attr_accessor :tracks
22
-
23
- attr_accessor :musical_features
24
-
25
- attr_accessor :pline
26
-
27
- attr_accessor :genre_predictions
21
+ attr_accessor :isrc
28
22
 
29
23
  attr_accessor :parties
30
24
 
@@ -34,27 +28,33 @@ module SongtradrApiClientRuby
34
28
 
35
29
  attr_accessor :titles
36
30
 
37
- attr_accessor :isrc
31
+ attr_accessor :tracks
32
+
33
+ attr_accessor :musical_features
38
34
 
39
35
  attr_accessor :tags
40
36
 
41
37
  attr_accessor :spotify_id
42
38
 
39
+ attr_accessor :pline
40
+
41
+ attr_accessor :genre_predictions
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
- :'tracks' => :'tracks',
48
- :'musical_features' => :'musicalFeatures',
49
- :'pline' => :'pline',
50
- :'genre_predictions' => :'genrePredictions',
47
+ :'isrc' => :'isrc',
51
48
  :'parties' => :'parties',
52
49
  :'genres' => :'genres',
53
50
  :'language_of_performance' => :'languageOfPerformance',
54
51
  :'titles' => :'titles',
55
- :'isrc' => :'isrc',
52
+ :'tracks' => :'tracks',
53
+ :'musical_features' => :'musicalFeatures',
56
54
  :'tags' => :'tags',
57
- :'spotify_id' => :'spotifyId'
55
+ :'spotify_id' => :'spotifyId',
56
+ :'pline' => :'pline',
57
+ :'genre_predictions' => :'genrePredictions'
58
58
  }
59
59
  end
60
60
 
@@ -67,17 +67,17 @@ module SongtradrApiClientRuby
67
67
  def self.openapi_types
68
68
  {
69
69
  :'duration' => :'Integer',
70
- :'tracks' => :'Array<TrackToMediumProductDTO>',
71
- :'musical_features' => :'MusicalFeaturesDTO',
72
- :'pline' => :'PLineDTO',
73
- :'genre_predictions' => :'Array<RecordingGenrePredictionDTO>',
70
+ :'isrc' => :'String',
74
71
  :'parties' => :'Array<RecordingPartyDTO>',
75
72
  :'genres' => :'Array<GenreDTO>',
76
73
  :'language_of_performance' => :'String',
77
74
  :'titles' => :'Array<TitleDTO>',
78
- :'isrc' => :'String',
75
+ :'tracks' => :'Array<TrackToMediumProductDTO>',
76
+ :'musical_features' => :'MusicalFeaturesDTO',
79
77
  :'tags' => :'Array<RecordingTagSmallDTO>',
80
- :'spotify_id' => :'String'
78
+ :'spotify_id' => :'String',
79
+ :'pline' => :'PLineDTO',
80
+ :'genre_predictions' => :'Array<RecordingGenrePredictionDTO>'
81
81
  }
82
82
  end
83
83
 
@@ -106,24 +106,10 @@ module SongtradrApiClientRuby
106
106
  self.duration = attributes[:'duration']
107
107
  end
108
108
 
109
- if attributes.key?(:'tracks')
110
- if (value = attributes[:'tracks']).is_a?(Array)
111
- self.tracks = value
112
- end
113
- end
114
-
115
- if attributes.key?(:'musical_features')
116
- self.musical_features = attributes[:'musical_features']
117
- end
118
-
119
- if attributes.key?(:'pline')
120
- self.pline = attributes[:'pline']
121
- end
122
-
123
- if attributes.key?(:'genre_predictions')
124
- if (value = attributes[:'genre_predictions']).is_a?(Array)
125
- self.genre_predictions = value
126
- end
109
+ if attributes.key?(:'isrc')
110
+ self.isrc = attributes[:'isrc']
111
+ else
112
+ self.isrc = nil
127
113
  end
128
114
 
129
115
  if attributes.key?(:'parties')
@@ -148,8 +134,14 @@ module SongtradrApiClientRuby
148
134
  end
149
135
  end
150
136
 
151
- if attributes.key?(:'isrc')
152
- self.isrc = attributes[:'isrc']
137
+ if attributes.key?(:'tracks')
138
+ if (value = attributes[:'tracks']).is_a?(Array)
139
+ self.tracks = value
140
+ end
141
+ end
142
+
143
+ if attributes.key?(:'musical_features')
144
+ self.musical_features = attributes[:'musical_features']
153
145
  end
154
146
 
155
147
  if attributes.key?(:'tags')
@@ -161,11 +153,22 @@ module SongtradrApiClientRuby
161
153
  if attributes.key?(:'spotify_id')
162
154
  self.spotify_id = attributes[:'spotify_id']
163
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
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,57 +180,78 @@ 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] tracks Value to be assigned
186
- def tracks=(tracks)
187
- @tracks = tracks
188
- end
189
-
190
- # Custom attribute writer method with validation
191
- # @param [Object] genre_predictions Value to be assigned
192
- def genre_predictions=(genre_predictions)
193
- @genre_predictions = genre_predictions
194
- end
195
-
196
188
  # Custom attribute writer method with validation
197
189
  # @param [Object] parties Value to be assigned
198
190
  def parties=(parties)
191
+ if parties.nil?
192
+ fail ArgumentError, 'parties cannot be nil'
193
+ end
194
+
199
195
  @parties = parties
200
196
  end
201
197
 
202
198
  # Custom attribute writer method with validation
203
199
  # @param [Object] genres Value to be assigned
204
200
  def genres=(genres)
201
+ if genres.nil?
202
+ fail ArgumentError, 'genres cannot be nil'
203
+ end
204
+
205
205
  @genres = genres
206
206
  end
207
207
 
208
208
  # Custom attribute writer method with validation
209
209
  # @param [Object] titles Value to be assigned
210
210
  def titles=(titles)
211
+ if titles.nil?
212
+ fail ArgumentError, 'titles cannot be nil'
213
+ end
214
+
211
215
  @titles = titles
212
216
  end
213
217
 
218
+ # Custom attribute writer method with validation
219
+ # @param [Object] tracks Value to be assigned
220
+ def tracks=(tracks)
221
+ if tracks.nil?
222
+ fail ArgumentError, 'tracks cannot be nil'
223
+ end
224
+
225
+ @tracks = tracks
226
+ end
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
- tracks == o.tracks &&
221
- musical_features == o.musical_features &&
222
- pline == o.pline &&
223
- genre_predictions == o.genre_predictions &&
244
+ isrc == o.isrc &&
224
245
  parties == o.parties &&
225
246
  genres == o.genres &&
226
247
  language_of_performance == o.language_of_performance &&
227
248
  titles == o.titles &&
228
- isrc == o.isrc &&
249
+ tracks == o.tracks &&
250
+ musical_features == o.musical_features &&
229
251
  tags == o.tags &&
230
- spotify_id == o.spotify_id
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, tracks, musical_features, pline, genre_predictions, parties, genres, language_of_performance, titles, isrc, tags, spotify_id].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.22
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.22
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 :musical_features
20
-
21
- attr_accessor :genre_predictions
19
+ attr_accessor :isrc
22
20
 
23
21
  attr_accessor :recording_party_entities
24
22
 
@@ -30,25 +28,27 @@ module SongtradrApiClientRuby
30
28
 
31
29
  attr_accessor :titles
32
30
 
33
- attr_accessor :isrc
31
+ attr_accessor :musical_features
34
32
 
35
33
  attr_accessor :tags
36
34
 
37
35
  attr_accessor :spotify_id
38
36
 
37
+ attr_accessor :genre_predictions
38
+
39
39
  # Attribute mapping from ruby-style variable name to JSON key.
40
40
  def self.attribute_map
41
41
  {
42
- :'musical_features' => :'musicalFeatures',
43
- :'genre_predictions' => :'genrePredictions',
42
+ :'isrc' => :'isrc',
44
43
  :'recording_party_entities' => :'recordingPartyEntities',
45
44
  :'genres' => :'genres',
46
45
  :'language_of_performance' => :'languageOfPerformance',
47
46
  :'release_date' => :'releaseDate',
48
47
  :'titles' => :'titles',
49
- :'isrc' => :'isrc',
48
+ :'musical_features' => :'musicalFeatures',
50
49
  :'tags' => :'tags',
51
- :'spotify_id' => :'spotifyId'
50
+ :'spotify_id' => :'spotifyId',
51
+ :'genre_predictions' => :'genrePredictions'
52
52
  }
53
53
  end
54
54
 
@@ -60,16 +60,16 @@ module SongtradrApiClientRuby
60
60
  # Attribute type mapping.
61
61
  def self.openapi_types
62
62
  {
63
- :'musical_features' => :'MusicalFeaturesDTO',
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',
68
67
  :'release_date' => :'Time',
69
68
  :'titles' => :'Array<TitleDTO>',
70
- :'isrc' => :'String',
69
+ :'musical_features' => :'MusicalFeaturesDTO',
71
70
  :'tags' => :'Array<RecordingTagSmallDTO>',
72
- :'spotify_id' => :'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?(:'musical_features')
98
- self.musical_features = attributes[:'musical_features']
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')
@@ -130,8 +126,8 @@ module SongtradrApiClientRuby
130
126
  end
131
127
  end
132
128
 
133
- if attributes.key?(:'isrc')
134
- self.isrc = attributes[:'isrc']
129
+ if attributes.key?(:'musical_features')
130
+ self.musical_features = attributes[:'musical_features']
135
131
  end
136
132
 
137
133
  if attributes.key?(:'tags')
@@ -143,11 +139,18 @@ module SongtradrApiClientRuby
143
139
  if attributes.key?(:'spotify_id')
144
140
  self.spotify_id = attributes[:'spotify_id']
145
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
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,49 +162,66 @@ 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
- musical_features == o.musical_features &&
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 &&
200
219
  release_date == o.release_date &&
201
220
  titles == o.titles &&
202
- isrc == o.isrc &&
221
+ musical_features == o.musical_features &&
203
222
  tags == o.tags &&
204
- spotify_id == o.spotify_id
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
- [musical_features, genre_predictions, recording_party_entities, genres, language_of_performance, release_date, titles, isrc, tags, spotify_id].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)