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.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/README.md +6 -5
- data/docs/AllowedValuesApi.md +2 -2
- data/docs/ApiKeyDTO.md +2 -2
- data/docs/CategoryMediumDTO.md +3 -3
- data/docs/FileSmallDTO.md +3 -3
- data/docs/MusicalFeaturesDTO.md +38 -38
- data/docs/PlaylistLargeDTO.md +2 -2
- data/docs/ProductMediumDTO.md +4 -4
- data/docs/RecordingApi.md +6 -0
- data/docs/RecordingLargeDTO.md +5 -5
- data/docs/RecordingMediumDTO.md +5 -3
- data/docs/RecordingMinimalWithMusicalFeaturesDTO.md +3 -3
- data/docs/RecordingSmallDTO.md +3 -3
- data/docs/TrackDTO.md +18 -0
- data/docs/UserApi.md +4 -0
- data/docs/UserDTO.md +18 -0
- data/lib/songtradr_api_client_ruby/api/allowed_values_api.rb +4 -4
- data/lib/songtradr_api_client_ruby/api/api_keys_api.rb +1 -1
- data/lib/songtradr_api_client_ruby/api/party_api.rb +1 -1
- data/lib/songtradr_api_client_ruby/api/playlist_api.rb +1 -1
- data/lib/songtradr_api_client_ruby/api/recording_api.rb +10 -1
- data/lib/songtradr_api_client_ruby/api/user_api.rb +7 -1
- data/lib/songtradr_api_client_ruby/api_client.rb +1 -1
- data/lib/songtradr_api_client_ruby/api_error.rb +1 -1
- data/lib/songtradr_api_client_ruby/configuration.rb +10 -8
- data/lib/songtradr_api_client_ruby/models/admin_api_user_dto.rb +13 -18
- data/lib/songtradr_api_client_ruby/models/api_key_dto.rb +29 -28
- data/lib/songtradr_api_client_ruby/models/category_medium_dto.rb +30 -31
- data/lib/songtradr_api_client_ruby/models/category_minimal_dto.rb +15 -18
- data/lib/songtradr_api_client_ruby/models/config_access_dto.rb +17 -18
- data/lib/songtradr_api_client_ruby/models/config_identifier_dto.rb +17 -18
- data/lib/songtradr_api_client_ruby/models/contributor_type_dto.rb +15 -18
- data/lib/songtradr_api_client_ruby/models/create_api_key_dto.rb +13 -18
- data/lib/songtradr_api_client_ruby/models/error_response.rb +19 -18
- data/lib/songtradr_api_client_ruby/models/field_summary_dto.rb +19 -18
- data/lib/songtradr_api_client_ruby/models/file_dto.rb +23 -18
- data/lib/songtradr_api_client_ruby/models/file_list_dto.rb +21 -18
- data/lib/songtradr_api_client_ruby/models/file_minimal_with_url_dto.rb +19 -18
- data/lib/songtradr_api_client_ruby/models/file_small_dto.rb +41 -36
- data/lib/songtradr_api_client_ruby/models/file_upload_dto.rb +13 -18
- data/lib/songtradr_api_client_ruby/models/file_w_ith_url_dto.rb +17 -18
- data/lib/songtradr_api_client_ruby/models/files_summary_dto.rb +15 -18
- data/lib/songtradr_api_client_ruby/models/forgot_password_dto.rb +15 -18
- data/lib/songtradr_api_client_ruby/models/genre_dto.rb +17 -18
- data/lib/songtradr_api_client_ruby/models/genre_minimal_dto.rb +15 -18
- data/lib/songtradr_api_client_ruby/models/genres_summary_dto.rb +17 -18
- data/lib/songtradr_api_client_ruby/models/init_put_recording_audio_dto.rb +13 -18
- data/lib/songtradr_api_client_ruby/models/jwt_token_dto.rb +17 -18
- data/lib/songtradr_api_client_ruby/models/login_dto.rb +17 -18
- data/lib/songtradr_api_client_ruby/models/musical_features_dto.rb +354 -359
- data/lib/songtradr_api_client_ruby/models/p_line_dto.rb +15 -18
- data/lib/songtradr_api_client_ruby/models/party_large_dto.rb +15 -18
- data/lib/songtradr_api_client_ruby/models/party_small_dto.rb +17 -18
- data/lib/songtradr_api_client_ruby/models/playlist_large_dto.rb +25 -28
- data/lib/songtradr_api_client_ruby/models/product_medium_dto.rb +46 -39
- data/lib/songtradr_api_client_ruby/models/product_party_dto.rb +15 -18
- data/lib/songtradr_api_client_ruby/models/recording_for_similarity_search_dto.rb +17 -18
- data/lib/songtradr_api_client_ruby/models/recording_genre_prediction_dto.rb +19 -18
- data/lib/songtradr_api_client_ruby/models/recording_large_dto.rb +57 -40
- data/lib/songtradr_api_client_ruby/models/recording_list_dto.rb +21 -18
- data/lib/songtradr_api_client_ruby/models/recording_medium_dto.rb +55 -31
- data/lib/songtradr_api_client_ruby/models/recording_minimal_with_musical_features_dto.rb +28 -31
- data/lib/songtradr_api_client_ruby/models/recording_minimal_with_taggrams_dto.rb +15 -18
- data/lib/songtradr_api_client_ruby/models/recording_minimal_with_tagstrengths_dto.rb +15 -18
- data/lib/songtradr_api_client_ruby/models/recording_party_dto.rb +15 -18
- data/lib/songtradr_api_client_ruby/models/recording_playlist_dto.rb +13 -18
- data/lib/songtradr_api_client_ruby/models/recording_small_dto.rb +36 -31
- data/lib/songtradr_api_client_ruby/models/recording_tag_small_dto.rb +15 -18
- data/lib/songtradr_api_client_ruby/models/save_file_recording_dto.rb +17 -18
- data/lib/songtradr_api_client_ruby/models/save_playlist_dto.rb +21 -18
- data/lib/songtradr_api_client_ruby/models/save_recording_genre_dto.rb +15 -18
- data/lib/songtradr_api_client_ruby/models/save_recording_party_dto.rb +17 -18
- data/lib/songtradr_api_client_ruby/models/save_recording_playlist_dto.rb +17 -18
- data/lib/songtradr_api_client_ruby/models/save_recording_tag_dto.rb +15 -18
- data/lib/songtradr_api_client_ruby/models/save_referrer_dto.rb +13 -18
- data/lib/songtradr_api_client_ruby/models/save_taggrams_dto.rb +13 -18
- data/lib/songtradr_api_client_ruby/models/save_user_dto.rb +15 -18
- data/lib/songtradr_api_client_ruby/models/search_filter_values_dto.rb +95 -18
- data/lib/songtradr_api_client_ruby/models/search_recording_granular_abstraction_dto.rb +15 -18
- data/lib/songtradr_api_client_ruby/models/search_recording_granular_dto.rb +15 -18
- data/lib/songtradr_api_client_ruby/models/sign_up_dto.rb +19 -18
- data/lib/songtradr_api_client_ruby/models/tag_dto.rb +17 -18
- data/lib/songtradr_api_client_ruby/models/tag_small_dto.rb +17 -18
- data/lib/songtradr_api_client_ruby/models/taggram_dto.rb +17 -18
- data/lib/songtradr_api_client_ruby/models/tags_summary_dto.rb +17 -18
- data/lib/songtradr_api_client_ruby/models/tagstrength_dto.rb +17 -18
- data/lib/songtradr_api_client_ruby/models/title_dto.rb +15 -18
- data/lib/songtradr_api_client_ruby/models/token_request.rb +15 -18
- data/lib/songtradr_api_client_ruby/models/track_dto.rb +215 -0
- data/lib/songtradr_api_client_ruby/models/track_to_medium_product_dto.rb +17 -18
- data/lib/songtradr_api_client_ruby/models/update_password_dto.rb +17 -18
- data/lib/songtradr_api_client_ruby/models/usage_dto.rb +13 -18
- data/lib/songtradr_api_client_ruby/models/user_dto.rb +196 -19
- data/lib/songtradr_api_client_ruby/version.rb +2 -2
- data/lib/songtradr_api_client_ruby.rb +2 -1
- data/openapi-generator-config.yaml +1 -1
- data/songtradr_api_client_ruby.gemspec +1 -1
- data/spec/api/allowed_values_api_spec.rb +2 -2
- data/spec/api/api_keys_api_spec.rb +1 -1
- data/spec/api/party_api_spec.rb +1 -1
- data/spec/api/playlist_api_spec.rb +1 -1
- data/spec/api/recording_api_spec.rb +4 -1
- data/spec/api/user_api_spec.rb +3 -1
- data/spec/api_client_spec.rb +1 -1
- data/spec/configuration_spec.rb +1 -1
- data/spec/models/admin_api_user_dto_spec.rb +1 -1
- data/spec/models/api_key_dto_spec.rb +3 -3
- data/spec/models/category_medium_dto_spec.rb +3 -3
- data/spec/models/category_minimal_dto_spec.rb +1 -1
- data/spec/models/config_access_dto_spec.rb +1 -1
- data/spec/models/config_identifier_dto_spec.rb +1 -1
- data/spec/models/contributor_type_dto_spec.rb +1 -1
- data/spec/models/create_api_key_dto_spec.rb +1 -1
- data/spec/models/error_response_spec.rb +1 -1
- data/spec/models/field_summary_dto_spec.rb +1 -1
- data/spec/models/file_dto_spec.rb +1 -1
- data/spec/models/file_list_dto_spec.rb +1 -1
- data/spec/models/file_minimal_with_url_dto_spec.rb +1 -1
- data/spec/models/file_small_dto_spec.rb +7 -7
- data/spec/models/file_upload_dto_spec.rb +1 -1
- data/spec/models/file_w_ith_url_dto_spec.rb +1 -1
- data/spec/models/files_summary_dto_spec.rb +1 -1
- data/spec/models/forgot_password_dto_spec.rb +1 -1
- data/spec/models/genre_dto_spec.rb +1 -1
- data/spec/models/genre_minimal_dto_spec.rb +1 -1
- data/spec/models/genres_summary_dto_spec.rb +1 -1
- data/spec/models/init_put_recording_audio_dto_spec.rb +1 -1
- data/spec/models/jwt_token_dto_spec.rb +1 -1
- data/spec/models/login_dto_spec.rb +1 -1
- data/spec/models/musical_features_dto_spec.rb +163 -163
- data/spec/models/p_line_dto_spec.rb +1 -1
- data/spec/models/party_large_dto_spec.rb +1 -1
- data/spec/models/party_small_dto_spec.rb +1 -1
- data/spec/models/playlist_large_dto_spec.rb +4 -4
- data/spec/models/product_medium_dto_spec.rb +7 -7
- data/spec/models/product_party_dto_spec.rb +1 -1
- data/spec/models/recording_for_similarity_search_dto_spec.rb +1 -1
- data/spec/models/recording_genre_prediction_dto_spec.rb +1 -1
- data/spec/models/recording_large_dto_spec.rb +9 -9
- data/spec/models/recording_list_dto_spec.rb +1 -1
- data/spec/models/recording_medium_dto_spec.rb +10 -4
- data/spec/models/recording_minimal_with_musical_features_dto_spec.rb +3 -3
- data/spec/models/recording_minimal_with_taggrams_dto_spec.rb +1 -1
- data/spec/models/recording_minimal_with_tagstrengths_dto_spec.rb +1 -1
- data/spec/models/recording_party_dto_spec.rb +1 -1
- data/spec/models/recording_playlist_dto_spec.rb +1 -1
- data/spec/models/recording_small_dto_spec.rb +4 -4
- data/spec/models/recording_tag_small_dto_spec.rb +1 -1
- data/spec/models/save_file_recording_dto_spec.rb +1 -1
- data/spec/models/save_playlist_dto_spec.rb +1 -1
- data/spec/models/save_recording_genre_dto_spec.rb +1 -1
- data/spec/models/save_recording_party_dto_spec.rb +1 -1
- data/spec/models/save_recording_playlist_dto_spec.rb +1 -1
- data/spec/models/save_recording_tag_dto_spec.rb +1 -1
- data/spec/models/save_referrer_dto_spec.rb +1 -1
- data/spec/models/save_taggrams_dto_spec.rb +1 -1
- data/spec/models/save_user_dto_spec.rb +1 -1
- data/spec/models/search_filter_values_dto_spec.rb +1 -1
- data/spec/models/search_recording_granular_abstraction_dto_spec.rb +1 -1
- data/spec/models/search_recording_granular_dto_spec.rb +1 -1
- data/spec/models/sign_up_dto_spec.rb +1 -1
- data/spec/models/tag_dto_spec.rb +1 -1
- data/spec/models/tag_small_dto_spec.rb +1 -1
- data/spec/models/taggram_dto_spec.rb +1 -1
- data/spec/models/tags_summary_dto_spec.rb +1 -1
- data/spec/models/tagstrength_dto_spec.rb +1 -1
- data/spec/models/title_dto_spec.rb +1 -1
- data/spec/models/token_request_spec.rb +1 -1
- data/spec/models/track_dto_spec.rb +34 -0
- data/spec/models/track_to_medium_product_dto_spec.rb +1 -1
- data/spec/models/update_password_dto_spec.rb +1 -1
- data/spec/models/usage_dto_spec.rb +1 -1
- data/spec/models/user_dto_spec.rb +55 -1
- data/spec/spec_helper.rb +1 -1
- metadata +62 -58
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#This is the Songtradr API. Use it to retrieve deep music metadata and trigger processes like auto-tagging. You can also use the API to manage your account and musicube cloud data. **Authentication** 1. Reach out to support@songtradr.com to receive a free account or use your login data if you are already signed up. 2. To authenticate, you need to login via the POST /api/v1/user/login endpoint. 3. The endpoint responds with a jwtToken which you can use in all following API requests as a bearer token. **Rate Limiting** The current limit is 120 Requests per minute. Reach out to us via support@songtradr.com if you need to request more. **Getting Started with auto-tagging** 1. If you want to get your own files auto-tagged, use the POST /api/v1/user/file/{name}/initUpload endpoint. It responds with a presigned S3 link where you can upload your file. 2. You can check the processing status of your file via the GET /api/v1/user/file/{name}/filesStatus endpoint. 3. As soon as processing is done, you can request the generated data via the GET /api/v1/user/files endpoint. **Getting Started with search** You can either search the released music via the /public/recording endpoints or your own private uploaded music via the /user/file/ endpoints. 1. If you want to search the world's released music, a good starting point is the GET /api/v1/public/recording/search endpoint. Please find the extensive list of parameters that serve as semantic search filters. 2. If you want to search your own previously uploaded music, a good starting point is the GET GET /api/v1/user/files endpoint. It has the same extensive list of parameters that serve as semantic search filters.
|
5
5
|
|
6
|
-
The version of the OpenAPI document: 1.
|
6
|
+
The version of the OpenAPI document: 1.13.0
|
7
7
|
Contact: info@songtradr.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
OpenAPI Generator version: 7.0.0-SNAPSHOT
|
@@ -149,22 +149,32 @@ module SongtradrApiClientRuby
|
|
149
149
|
|
150
150
|
if attributes.key?(:'id')
|
151
151
|
self.id = attributes[:'id']
|
152
|
+
else
|
153
|
+
self.id = nil
|
152
154
|
end
|
153
155
|
|
154
156
|
if attributes.key?(:'name')
|
155
157
|
self.name = attributes[:'name']
|
158
|
+
else
|
159
|
+
self.name = nil
|
156
160
|
end
|
157
161
|
|
158
162
|
if attributes.key?(:'object_key')
|
159
163
|
self.object_key = attributes[:'object_key']
|
164
|
+
else
|
165
|
+
self.object_key = nil
|
160
166
|
end
|
161
167
|
|
162
168
|
if attributes.key?(:'folder')
|
163
169
|
self.folder = attributes[:'folder']
|
170
|
+
else
|
171
|
+
self.folder = nil
|
164
172
|
end
|
165
173
|
|
166
174
|
if attributes.key?(:'extension')
|
167
175
|
self.extension = attributes[:'extension']
|
176
|
+
else
|
177
|
+
self.extension = nil
|
168
178
|
end
|
169
179
|
|
170
180
|
if attributes.key?(:'url')
|
@@ -219,6 +229,7 @@ module SongtradrApiClientRuby
|
|
219
229
|
# Show invalid properties with the reasons. Usually used together with valid?
|
220
230
|
# @return Array for valid properties with the reasons
|
221
231
|
def list_invalid_properties
|
232
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
222
233
|
invalid_properties = Array.new
|
223
234
|
if @id.nil?
|
224
235
|
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
@@ -246,6 +257,7 @@ module SongtradrApiClientRuby
|
|
246
257
|
# Check to see if the all the properties in the model are valid
|
247
258
|
# @return true if the model is valid
|
248
259
|
def valid?
|
260
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
249
261
|
return false if @id.nil?
|
250
262
|
return false if @name.nil?
|
251
263
|
return false if @object_key.nil?
|
@@ -330,37 +342,30 @@ module SongtradrApiClientRuby
|
|
330
342
|
# @param [Hash] attributes Model attributes in the form of hash
|
331
343
|
# @return [Object] Returns the model itself
|
332
344
|
def self.build_from_hash(attributes)
|
333
|
-
new.build_from_hash(attributes)
|
334
|
-
end
|
335
|
-
|
336
|
-
# Builds the object from hash
|
337
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
338
|
-
# @return [Object] Returns the model itself
|
339
|
-
def build_from_hash(attributes)
|
340
345
|
return nil unless attributes.is_a?(Hash)
|
341
346
|
attributes = attributes.transform_keys(&:to_sym)
|
342
|
-
|
343
|
-
|
344
|
-
|
347
|
+
transformed_hash = {}
|
348
|
+
openapi_types.each_pair do |key, type|
|
349
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
350
|
+
transformed_hash["#{key}"] = nil
|
345
351
|
elsif type =~ /\AArray<(.*)>/i
|
346
352
|
# check to ensure the input is an array given that the attribute
|
347
353
|
# is documented as an array but the input is not
|
348
|
-
if attributes[
|
349
|
-
|
354
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
355
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
350
356
|
end
|
351
|
-
elsif !attributes[
|
352
|
-
|
357
|
+
elsif !attributes[attribute_map[key]].nil?
|
358
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
353
359
|
end
|
354
360
|
end
|
355
|
-
|
356
|
-
self
|
361
|
+
new(transformed_hash)
|
357
362
|
end
|
358
363
|
|
359
364
|
# Deserializes the data based on type
|
360
365
|
# @param string type Data type
|
361
366
|
# @param string value Value to be deserialized
|
362
367
|
# @return [Object] Deserialized data
|
363
|
-
def _deserialize(type, value)
|
368
|
+
def self._deserialize(type, value)
|
364
369
|
case type.to_sym
|
365
370
|
when :Time
|
366
371
|
Time.parse(value)
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#This is the Songtradr API. Use it to retrieve deep music metadata and trigger processes like auto-tagging. You can also use the API to manage your account and musicube cloud data. **Authentication** 1. Reach out to support@songtradr.com to receive a free account or use your login data if you are already signed up. 2. To authenticate, you need to login via the POST /api/v1/user/login endpoint. 3. The endpoint responds with a jwtToken which you can use in all following API requests as a bearer token. **Rate Limiting** The current limit is 120 Requests per minute. Reach out to us via support@songtradr.com if you need to request more. **Getting Started with auto-tagging** 1. If you want to get your own files auto-tagged, use the POST /api/v1/user/file/{name}/initUpload endpoint. It responds with a presigned S3 link where you can upload your file. 2. You can check the processing status of your file via the GET /api/v1/user/file/{name}/filesStatus endpoint. 3. As soon as processing is done, you can request the generated data via the GET /api/v1/user/files endpoint. **Getting Started with search** You can either search the released music via the /public/recording endpoints or your own private uploaded music via the /user/file/ endpoints. 1. If you want to search the world's released music, a good starting point is the GET /api/v1/public/recording/search endpoint. Please find the extensive list of parameters that serve as semantic search filters. 2. If you want to search your own previously uploaded music, a good starting point is the GET GET /api/v1/user/files endpoint. It has the same extensive list of parameters that serve as semantic search filters.
|
5
5
|
|
6
|
-
The version of the OpenAPI document: 1.
|
6
|
+
The version of the OpenAPI document: 1.13.0
|
7
7
|
Contact: info@songtradr.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
OpenAPI Generator version: 7.0.0-SNAPSHOT
|
@@ -74,24 +74,33 @@ module SongtradrApiClientRuby
|
|
74
74
|
if (value = attributes[:'files']).is_a?(Array)
|
75
75
|
self.files = value
|
76
76
|
end
|
77
|
+
else
|
78
|
+
self.files = 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 @files.nil?
|
97
106
|
invalid_properties.push('invalid value for "files", files 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 @files.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
|
-
|
162
|
-
|
163
|
-
|
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[
|
168
|
-
|
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[
|
171
|
-
|
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.
|
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
|
@@ -68,20 +68,27 @@ module SongtradrApiClientRuby
|
|
68
68
|
|
69
69
|
if attributes.key?(:'file_name')
|
70
70
|
self.file_name = attributes[:'file_name']
|
71
|
+
else
|
72
|
+
self.file_name = nil
|
71
73
|
end
|
72
74
|
|
73
75
|
if attributes.key?(:'url')
|
74
76
|
self.url = attributes[:'url']
|
77
|
+
else
|
78
|
+
self.url = nil
|
75
79
|
end
|
76
80
|
|
77
81
|
if attributes.key?(:'isrc')
|
78
82
|
self.isrc = attributes[:'isrc']
|
83
|
+
else
|
84
|
+
self.isrc = nil
|
79
85
|
end
|
80
86
|
end
|
81
87
|
|
82
88
|
# Show invalid properties with the reasons. Usually used together with valid?
|
83
89
|
# @return Array for valid properties with the reasons
|
84
90
|
def list_invalid_properties
|
91
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
85
92
|
invalid_properties = Array.new
|
86
93
|
if @file_name.nil?
|
87
94
|
invalid_properties.push('invalid value for "file_name", file_name cannot be nil.')
|
@@ -101,6 +108,7 @@ module SongtradrApiClientRuby
|
|
101
108
|
# Check to see if the all the properties in the model are valid
|
102
109
|
# @return true if the model is valid
|
103
110
|
def valid?
|
111
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
104
112
|
return false if @file_name.nil?
|
105
113
|
return false if @url.nil?
|
106
114
|
return false if @isrc.nil?
|
@@ -133,37 +141,30 @@ module SongtradrApiClientRuby
|
|
133
141
|
# @param [Hash] attributes Model attributes in the form of hash
|
134
142
|
# @return [Object] Returns the model itself
|
135
143
|
def self.build_from_hash(attributes)
|
136
|
-
new.build_from_hash(attributes)
|
137
|
-
end
|
138
|
-
|
139
|
-
# Builds the object from hash
|
140
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
141
|
-
# @return [Object] Returns the model itself
|
142
|
-
def build_from_hash(attributes)
|
143
144
|
return nil unless attributes.is_a?(Hash)
|
144
145
|
attributes = attributes.transform_keys(&:to_sym)
|
145
|
-
|
146
|
-
|
147
|
-
|
146
|
+
transformed_hash = {}
|
147
|
+
openapi_types.each_pair do |key, type|
|
148
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
149
|
+
transformed_hash["#{key}"] = nil
|
148
150
|
elsif type =~ /\AArray<(.*)>/i
|
149
151
|
# check to ensure the input is an array given that the attribute
|
150
152
|
# is documented as an array but the input is not
|
151
|
-
if attributes[
|
152
|
-
|
153
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
154
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
153
155
|
end
|
154
|
-
elsif !attributes[
|
155
|
-
|
156
|
+
elsif !attributes[attribute_map[key]].nil?
|
157
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
156
158
|
end
|
157
159
|
end
|
158
|
-
|
159
|
-
self
|
160
|
+
new(transformed_hash)
|
160
161
|
end
|
161
162
|
|
162
163
|
# Deserializes the data based on type
|
163
164
|
# @param string type Data type
|
164
165
|
# @param string value Value to be deserialized
|
165
166
|
# @return [Object] Deserialized data
|
166
|
-
def _deserialize(type, value)
|
167
|
+
def self._deserialize(type, value)
|
167
168
|
case type.to_sym
|
168
169
|
when :Time
|
169
170
|
Time.parse(value)
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#This is the Songtradr API. Use it to retrieve deep music metadata and trigger processes like auto-tagging. You can also use the API to manage your account and musicube cloud data. **Authentication** 1. Reach out to support@songtradr.com to receive a free account or use your login data if you are already signed up. 2. To authenticate, you need to login via the POST /api/v1/user/login endpoint. 3. The endpoint responds with a jwtToken which you can use in all following API requests as a bearer token. **Rate Limiting** The current limit is 120 Requests per minute. Reach out to us via support@songtradr.com if you need to request more. **Getting Started with auto-tagging** 1. If you want to get your own files auto-tagged, use the POST /api/v1/user/file/{name}/initUpload endpoint. It responds with a presigned S3 link where you can upload your file. 2. You can check the processing status of your file via the GET /api/v1/user/file/{name}/filesStatus endpoint. 3. As soon as processing is done, you can request the generated data via the GET /api/v1/user/files endpoint. **Getting Started with search** You can either search the released music via the /public/recording endpoints or your own private uploaded music via the /user/file/ endpoints. 1. If you want to search the world's released music, a good starting point is the GET /api/v1/public/recording/search endpoint. Please find the extensive list of parameters that serve as semantic search filters. 2. If you want to search your own previously uploaded music, a good starting point is the GET GET /api/v1/user/files endpoint. It has the same extensive list of parameters that serve as semantic search filters.
|
5
5
|
|
6
|
-
The version of the OpenAPI document: 1.
|
6
|
+
The version of the OpenAPI document: 1.13.0
|
7
7
|
Contact: info@songtradr.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
OpenAPI Generator version: 7.0.0-SNAPSHOT
|
@@ -25,6 +25,8 @@ module SongtradrApiClientRuby
|
|
25
25
|
|
26
26
|
attr_accessor :error_message
|
27
27
|
|
28
|
+
attr_accessor :folder
|
29
|
+
|
28
30
|
attr_accessor :object_key
|
29
31
|
|
30
32
|
attr_accessor :upload_start_time
|
@@ -47,8 +49,6 @@ module SongtradrApiClientRuby
|
|
47
49
|
|
48
50
|
attr_accessor :error_time
|
49
51
|
|
50
|
-
attr_accessor :folder
|
51
|
-
|
52
52
|
class EnumAttributeValidator
|
53
53
|
attr_reader :datatype
|
54
54
|
attr_reader :allowable_values
|
@@ -78,6 +78,7 @@ module SongtradrApiClientRuby
|
|
78
78
|
:'id' => :'id',
|
79
79
|
:'extension' => :'extension',
|
80
80
|
:'error_message' => :'error_message',
|
81
|
+
:'folder' => :'folder',
|
81
82
|
:'object_key' => :'objectKey',
|
82
83
|
:'upload_start_time' => :'uploadStartTime',
|
83
84
|
:'upload_end_time' => :'uploadEndTime',
|
@@ -87,8 +88,7 @@ module SongtradrApiClientRuby
|
|
87
88
|
:'inference_status' => :'inferenceStatus',
|
88
89
|
:'inference_start_time' => :'inferenceStartTime',
|
89
90
|
:'inference_end_time' => :'inferenceEndTime',
|
90
|
-
:'error_time' => :'error_time'
|
91
|
-
:'folder' => :'folder'
|
91
|
+
:'error_time' => :'error_time'
|
92
92
|
}
|
93
93
|
end
|
94
94
|
|
@@ -104,6 +104,7 @@ module SongtradrApiClientRuby
|
|
104
104
|
:'id' => :'Integer',
|
105
105
|
:'extension' => :'String',
|
106
106
|
:'error_message' => :'String',
|
107
|
+
:'folder' => :'String',
|
107
108
|
:'object_key' => :'String',
|
108
109
|
:'upload_start_time' => :'Time',
|
109
110
|
:'upload_end_time' => :'Time',
|
@@ -113,8 +114,7 @@ module SongtradrApiClientRuby
|
|
113
114
|
:'inference_status' => :'String',
|
114
115
|
:'inference_start_time' => :'Time',
|
115
116
|
:'inference_end_time' => :'Time',
|
116
|
-
:'error_time' => :'Time'
|
117
|
-
:'folder' => :'String'
|
117
|
+
:'error_time' => :'Time'
|
118
118
|
}
|
119
119
|
end
|
120
120
|
|
@@ -141,22 +141,36 @@ module SongtradrApiClientRuby
|
|
141
141
|
|
142
142
|
if attributes.key?(:'name')
|
143
143
|
self.name = attributes[:'name']
|
144
|
+
else
|
145
|
+
self.name = nil
|
144
146
|
end
|
145
147
|
|
146
148
|
if attributes.key?(:'id')
|
147
149
|
self.id = attributes[:'id']
|
150
|
+
else
|
151
|
+
self.id = nil
|
148
152
|
end
|
149
153
|
|
150
154
|
if attributes.key?(:'extension')
|
151
155
|
self.extension = attributes[:'extension']
|
156
|
+
else
|
157
|
+
self.extension = nil
|
152
158
|
end
|
153
159
|
|
154
160
|
if attributes.key?(:'error_message')
|
155
161
|
self.error_message = attributes[:'error_message']
|
156
162
|
end
|
157
163
|
|
164
|
+
if attributes.key?(:'folder')
|
165
|
+
self.folder = attributes[:'folder']
|
166
|
+
else
|
167
|
+
self.folder = nil
|
168
|
+
end
|
169
|
+
|
158
170
|
if attributes.key?(:'object_key')
|
159
171
|
self.object_key = attributes[:'object_key']
|
172
|
+
else
|
173
|
+
self.object_key = nil
|
160
174
|
end
|
161
175
|
|
162
176
|
if attributes.key?(:'upload_start_time')
|
@@ -194,15 +208,12 @@ module SongtradrApiClientRuby
|
|
194
208
|
if attributes.key?(:'error_time')
|
195
209
|
self.error_time = attributes[:'error_time']
|
196
210
|
end
|
197
|
-
|
198
|
-
if attributes.key?(:'folder')
|
199
|
-
self.folder = attributes[:'folder']
|
200
|
-
end
|
201
211
|
end
|
202
212
|
|
203
213
|
# Show invalid properties with the reasons. Usually used together with valid?
|
204
214
|
# @return Array for valid properties with the reasons
|
205
215
|
def list_invalid_properties
|
216
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
206
217
|
invalid_properties = Array.new
|
207
218
|
if @name.nil?
|
208
219
|
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
@@ -216,31 +227,32 @@ module SongtradrApiClientRuby
|
|
216
227
|
invalid_properties.push('invalid value for "extension", extension cannot be nil.')
|
217
228
|
end
|
218
229
|
|
219
|
-
if @object_key.nil?
|
220
|
-
invalid_properties.push('invalid value for "object_key", object_key cannot be nil.')
|
221
|
-
end
|
222
|
-
|
223
230
|
if @folder.nil?
|
224
231
|
invalid_properties.push('invalid value for "folder", folder cannot be nil.')
|
225
232
|
end
|
226
233
|
|
234
|
+
if @object_key.nil?
|
235
|
+
invalid_properties.push('invalid value for "object_key", object_key cannot be nil.')
|
236
|
+
end
|
237
|
+
|
227
238
|
invalid_properties
|
228
239
|
end
|
229
240
|
|
230
241
|
# Check to see if the all the properties in the model are valid
|
231
242
|
# @return true if the model is valid
|
232
243
|
def valid?
|
244
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
233
245
|
return false if @name.nil?
|
234
246
|
return false if @id.nil?
|
235
247
|
return false if @extension.nil?
|
236
248
|
extension_validator = EnumAttributeValidator.new('String', ["mp3", "wav", "flac"])
|
237
249
|
return false unless extension_validator.valid?(@extension)
|
250
|
+
return false if @folder.nil?
|
238
251
|
return false if @object_key.nil?
|
239
252
|
fingerprint_status_validator = EnumAttributeValidator.new('String', ["processing", "error", "found", "not_found", "not_started"])
|
240
253
|
return false unless fingerprint_status_validator.valid?(@fingerprint_status)
|
241
254
|
inference_status_validator = EnumAttributeValidator.new('String', ["processing", "error", "done", "not_started"])
|
242
255
|
return false unless inference_status_validator.valid?(@inference_status)
|
243
|
-
return false if @folder.nil?
|
244
256
|
true
|
245
257
|
end
|
246
258
|
|
@@ -283,6 +295,7 @@ module SongtradrApiClientRuby
|
|
283
295
|
id == o.id &&
|
284
296
|
extension == o.extension &&
|
285
297
|
error_message == o.error_message &&
|
298
|
+
folder == o.folder &&
|
286
299
|
object_key == o.object_key &&
|
287
300
|
upload_start_time == o.upload_start_time &&
|
288
301
|
upload_end_time == o.upload_end_time &&
|
@@ -292,8 +305,7 @@ module SongtradrApiClientRuby
|
|
292
305
|
inference_status == o.inference_status &&
|
293
306
|
inference_start_time == o.inference_start_time &&
|
294
307
|
inference_end_time == o.inference_end_time &&
|
295
|
-
error_time == o.error_time
|
296
|
-
folder == o.folder
|
308
|
+
error_time == o.error_time
|
297
309
|
end
|
298
310
|
|
299
311
|
# @see the `==` method
|
@@ -305,44 +317,37 @@ module SongtradrApiClientRuby
|
|
305
317
|
# Calculates hash code according to all attributes.
|
306
318
|
# @return [Integer] Hash code
|
307
319
|
def hash
|
308
|
-
[name, id, extension, error_message, object_key, upload_start_time, upload_end_time, fingerprint_status, fingerprint_start_time, fingerprint_end_time, inference_status, inference_start_time, inference_end_time, error_time
|
320
|
+
[name, id, extension, error_message, folder, object_key, upload_start_time, upload_end_time, fingerprint_status, fingerprint_start_time, fingerprint_end_time, inference_status, inference_start_time, inference_end_time, error_time].hash
|
309
321
|
end
|
310
322
|
|
311
323
|
# Builds the object from hash
|
312
324
|
# @param [Hash] attributes Model attributes in the form of hash
|
313
325
|
# @return [Object] Returns the model itself
|
314
326
|
def self.build_from_hash(attributes)
|
315
|
-
new.build_from_hash(attributes)
|
316
|
-
end
|
317
|
-
|
318
|
-
# Builds the object from hash
|
319
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
320
|
-
# @return [Object] Returns the model itself
|
321
|
-
def build_from_hash(attributes)
|
322
327
|
return nil unless attributes.is_a?(Hash)
|
323
328
|
attributes = attributes.transform_keys(&:to_sym)
|
324
|
-
|
325
|
-
|
326
|
-
|
329
|
+
transformed_hash = {}
|
330
|
+
openapi_types.each_pair do |key, type|
|
331
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
332
|
+
transformed_hash["#{key}"] = nil
|
327
333
|
elsif type =~ /\AArray<(.*)>/i
|
328
334
|
# check to ensure the input is an array given that the attribute
|
329
335
|
# is documented as an array but the input is not
|
330
|
-
if attributes[
|
331
|
-
|
336
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
337
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
332
338
|
end
|
333
|
-
elsif !attributes[
|
334
|
-
|
339
|
+
elsif !attributes[attribute_map[key]].nil?
|
340
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
335
341
|
end
|
336
342
|
end
|
337
|
-
|
338
|
-
self
|
343
|
+
new(transformed_hash)
|
339
344
|
end
|
340
345
|
|
341
346
|
# Deserializes the data based on type
|
342
347
|
# @param string type Data type
|
343
348
|
# @param string value Value to be deserialized
|
344
349
|
# @return [Object] Deserialized data
|
345
|
-
def _deserialize(type, value)
|
350
|
+
def self._deserialize(type, value)
|
346
351
|
case type.to_sym
|
347
352
|
when :Time
|
348
353
|
Time.parse(value)
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#This is the Songtradr API. Use it to retrieve deep music metadata and trigger processes like auto-tagging. You can also use the API to manage your account and musicube cloud data. **Authentication** 1. Reach out to support@songtradr.com to receive a free account or use your login data if you are already signed up. 2. To authenticate, you need to login via the POST /api/v1/user/login endpoint. 3. The endpoint responds with a jwtToken which you can use in all following API requests as a bearer token. **Rate Limiting** The current limit is 120 Requests per minute. Reach out to us via support@songtradr.com if you need to request more. **Getting Started with auto-tagging** 1. If you want to get your own files auto-tagged, use the POST /api/v1/user/file/{name}/initUpload endpoint. It responds with a presigned S3 link where you can upload your file. 2. You can check the processing status of your file via the GET /api/v1/user/file/{name}/filesStatus endpoint. 3. As soon as processing is done, you can request the generated data via the GET /api/v1/user/files endpoint. **Getting Started with search** You can either search the released music via the /public/recording endpoints or your own private uploaded music via the /user/file/ endpoints. 1. If you want to search the world's released music, a good starting point is the GET /api/v1/public/recording/search endpoint. Please find the extensive list of parameters that serve as semantic search filters. 2. If you want to search your own previously uploaded music, a good starting point is the GET GET /api/v1/user/files endpoint. It has the same extensive list of parameters that serve as semantic search filters.
|
5
5
|
|
6
|
-
The version of the OpenAPI document: 1.
|
6
|
+
The version of the OpenAPI document: 1.13.0
|
7
7
|
Contact: info@songtradr.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
OpenAPI Generator version: 7.0.0-SNAPSHOT
|
@@ -88,6 +88,7 @@ module SongtradrApiClientRuby
|
|
88
88
|
# Show invalid properties with the reasons. Usually used together with valid?
|
89
89
|
# @return Array for valid properties with the reasons
|
90
90
|
def list_invalid_properties
|
91
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
91
92
|
invalid_properties = Array.new
|
92
93
|
invalid_properties
|
93
94
|
end
|
@@ -95,6 +96,7 @@ module SongtradrApiClientRuby
|
|
95
96
|
# Check to see if the all the properties in the model are valid
|
96
97
|
# @return true if the model is valid
|
97
98
|
def valid?
|
99
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
98
100
|
true
|
99
101
|
end
|
100
102
|
|
@@ -124,37 +126,30 @@ module SongtradrApiClientRuby
|
|
124
126
|
# @param [Hash] attributes Model attributes in the form of hash
|
125
127
|
# @return [Object] Returns the model itself
|
126
128
|
def self.build_from_hash(attributes)
|
127
|
-
new.build_from_hash(attributes)
|
128
|
-
end
|
129
|
-
|
130
|
-
# Builds the object from hash
|
131
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
132
|
-
# @return [Object] Returns the model itself
|
133
|
-
def build_from_hash(attributes)
|
134
129
|
return nil unless attributes.is_a?(Hash)
|
135
130
|
attributes = attributes.transform_keys(&:to_sym)
|
136
|
-
|
137
|
-
|
138
|
-
|
131
|
+
transformed_hash = {}
|
132
|
+
openapi_types.each_pair do |key, type|
|
133
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
134
|
+
transformed_hash["#{key}"] = nil
|
139
135
|
elsif type =~ /\AArray<(.*)>/i
|
140
136
|
# check to ensure the input is an array given that the attribute
|
141
137
|
# is documented as an array but the input is not
|
142
|
-
if attributes[
|
143
|
-
|
138
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
139
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
144
140
|
end
|
145
|
-
elsif !attributes[
|
146
|
-
|
141
|
+
elsif !attributes[attribute_map[key]].nil?
|
142
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
147
143
|
end
|
148
144
|
end
|
149
|
-
|
150
|
-
self
|
145
|
+
new(transformed_hash)
|
151
146
|
end
|
152
147
|
|
153
148
|
# Deserializes the data based on type
|
154
149
|
# @param string type Data type
|
155
150
|
# @param string value Value to be deserialized
|
156
151
|
# @return [Object] Deserialized data
|
157
|
-
def _deserialize(type, value)
|
152
|
+
def self._deserialize(type, value)
|
158
153
|
case type.to_sym
|
159
154
|
when :Time
|
160
155
|
Time.parse(value)
|