songtradr_api_client_ruby 1.17.0 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (131) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +24 -22
  3. data/README.md +7 -11
  4. data/docs/FileSmallDTO.md +2 -2
  5. data/docs/MusicalFeaturesDTO.md +113 -109
  6. data/docs/RecordingApi.md +71 -69
  7. data/docs/RecordingMediumDTO.md +2 -2
  8. data/docs/SearchFilterValuesDTO.md +2 -0
  9. data/docs/UserApi.md +67 -187
  10. data/docs/UserDTO.md +2 -0
  11. data/lib/songtradr_api_client_ruby/api/allowed_values_api.rb +2 -2
  12. data/lib/songtradr_api_client_ruby/api/recording_api.rb +74 -71
  13. data/lib/songtradr_api_client_ruby/api/user_api.rb +86 -403
  14. data/lib/songtradr_api_client_ruby/api_client.rb +5 -4
  15. data/lib/songtradr_api_client_ruby/api_error.rb +2 -2
  16. data/lib/songtradr_api_client_ruby/configuration.rb +2 -2
  17. data/lib/songtradr_api_client_ruby/models/category_medium_dto.rb +2 -2
  18. data/lib/songtradr_api_client_ruby/models/category_minimal_dto.rb +2 -2
  19. data/lib/songtradr_api_client_ruby/models/config_access_dto.rb +2 -2
  20. data/lib/songtradr_api_client_ruby/models/config_identifier_dto.rb +2 -2
  21. data/lib/songtradr_api_client_ruby/models/contributor_type_dto.rb +2 -2
  22. data/lib/songtradr_api_client_ruby/models/error_response.rb +2 -2
  23. data/lib/songtradr_api_client_ruby/models/field_summary_dto.rb +2 -2
  24. data/lib/songtradr_api_client_ruby/models/file_dto.rb +2 -2
  25. data/lib/songtradr_api_client_ruby/models/file_list_dto.rb +2 -2
  26. data/lib/songtradr_api_client_ruby/models/file_small_dto.rb +14 -14
  27. data/lib/songtradr_api_client_ruby/models/file_upload_dto.rb +2 -2
  28. data/lib/songtradr_api_client_ruby/models/file_w_ith_url_dto.rb +2 -2
  29. data/lib/songtradr_api_client_ruby/models/files_summary_dto.rb +2 -2
  30. data/lib/songtradr_api_client_ruby/models/forgot_password_dto.rb +2 -2
  31. data/lib/songtradr_api_client_ruby/models/genre_dto.rb +2 -2
  32. data/lib/songtradr_api_client_ruby/models/genre_minimal_dto.rb +2 -2
  33. data/lib/songtradr_api_client_ruby/models/genres_summary_dto.rb +2 -2
  34. data/lib/songtradr_api_client_ruby/models/image_recognition_response.rb +2 -2
  35. data/lib/songtradr_api_client_ruby/models/init_put_recording_audio_dto.rb +2 -2
  36. data/lib/songtradr_api_client_ruby/models/jwt_token_dto.rb +2 -2
  37. data/lib/songtradr_api_client_ruby/models/login_dto.rb +2 -2
  38. data/lib/songtradr_api_client_ruby/models/musical_features_dto.rb +662 -631
  39. data/lib/songtradr_api_client_ruby/models/party_small_dto.rb +2 -2
  40. data/lib/songtradr_api_client_ruby/models/recording_for_similarity_search_dto.rb +2 -2
  41. data/lib/songtradr_api_client_ruby/models/recording_genre_prediction_dto.rb +2 -2
  42. data/lib/songtradr_api_client_ruby/models/recording_list_dto.rb +2 -2
  43. data/lib/songtradr_api_client_ruby/models/recording_medium_dto.rb +24 -24
  44. data/lib/songtradr_api_client_ruby/models/recording_minimal_with_musical_features_dto.rb +2 -2
  45. data/lib/songtradr_api_client_ruby/models/recording_minimal_with_taggrams_dto.rb +2 -2
  46. data/lib/songtradr_api_client_ruby/models/recording_minimal_with_tagstrengths_dto.rb +2 -2
  47. data/lib/songtradr_api_client_ruby/models/recording_party_dto.rb +2 -2
  48. data/lib/songtradr_api_client_ruby/models/recording_small_dto.rb +2 -2
  49. data/lib/songtradr_api_client_ruby/models/recording_tag_small_dto.rb +2 -2
  50. data/lib/songtradr_api_client_ruby/models/save_user_dto.rb +2 -2
  51. data/lib/songtradr_api_client_ruby/models/search_filter_values_dto.rb +21 -3
  52. data/lib/songtradr_api_client_ruby/models/sign_up_dto.rb +2 -2
  53. data/lib/songtradr_api_client_ruby/models/tag_dto.rb +2 -2
  54. data/lib/songtradr_api_client_ruby/models/tag_small_dto.rb +2 -2
  55. data/lib/songtradr_api_client_ruby/models/taggram_dto.rb +2 -2
  56. data/lib/songtradr_api_client_ruby/models/tags_summary_dto.rb +2 -2
  57. data/lib/songtradr_api_client_ruby/models/tagstrength_dto.rb +2 -2
  58. data/lib/songtradr_api_client_ruby/models/title_dto.rb +2 -2
  59. data/lib/songtradr_api_client_ruby/models/token_request.rb +2 -2
  60. data/lib/songtradr_api_client_ruby/models/track_dto.rb +2 -2
  61. data/lib/songtradr_api_client_ruby/models/update_password_dto.rb +2 -2
  62. data/lib/songtradr_api_client_ruby/models/user_dto.rb +19 -3
  63. data/lib/songtradr_api_client_ruby/models/video_recognition_response.rb +2 -2
  64. data/lib/songtradr_api_client_ruby/version.rb +3 -3
  65. data/lib/songtradr_api_client_ruby.rb +2 -6
  66. data/openapi-generator-config.yaml +1 -1
  67. data/songtradr_api_client_ruby.gemspec +3 -2
  68. data/spec/api/allowed_values_api_spec.rb +2 -2
  69. data/spec/api/recording_api_spec.rb +14 -13
  70. data/spec/api/user_api_spec.rb +15 -74
  71. data/spec/models/category_medium_dto_spec.rb +2 -2
  72. data/spec/models/category_minimal_dto_spec.rb +2 -2
  73. data/spec/models/config_access_dto_spec.rb +2 -2
  74. data/spec/models/config_identifier_dto_spec.rb +2 -2
  75. data/spec/models/contributor_type_dto_spec.rb +2 -2
  76. data/spec/models/error_response_spec.rb +2 -2
  77. data/spec/models/field_summary_dto_spec.rb +2 -2
  78. data/spec/models/file_dto_spec.rb +2 -2
  79. data/spec/models/file_list_dto_spec.rb +2 -2
  80. data/spec/models/file_small_dto_spec.rb +10 -10
  81. data/spec/models/file_upload_dto_spec.rb +2 -2
  82. data/spec/models/file_w_ith_url_dto_spec.rb +2 -2
  83. data/spec/models/files_summary_dto_spec.rb +2 -2
  84. data/spec/models/forgot_password_dto_spec.rb +2 -2
  85. data/spec/models/genre_dto_spec.rb +2 -2
  86. data/spec/models/genre_minimal_dto_spec.rb +2 -2
  87. data/spec/models/genres_summary_dto_spec.rb +2 -2
  88. data/spec/models/image_recognition_response_spec.rb +2 -2
  89. data/spec/models/init_put_recording_audio_dto_spec.rb +2 -2
  90. data/spec/models/jwt_token_dto_spec.rb +2 -2
  91. data/spec/models/login_dto_spec.rb +2 -2
  92. data/spec/models/musical_features_dto_spec.rb +230 -214
  93. data/spec/models/party_small_dto_spec.rb +2 -2
  94. data/spec/models/recording_for_similarity_search_dto_spec.rb +2 -2
  95. data/spec/models/recording_genre_prediction_dto_spec.rb +2 -2
  96. data/spec/models/recording_list_dto_spec.rb +2 -2
  97. data/spec/models/recording_medium_dto_spec.rb +8 -8
  98. data/spec/models/recording_minimal_with_musical_features_dto_spec.rb +2 -2
  99. data/spec/models/recording_minimal_with_taggrams_dto_spec.rb +2 -2
  100. data/spec/models/recording_minimal_with_tagstrengths_dto_spec.rb +2 -2
  101. data/spec/models/recording_party_dto_spec.rb +2 -2
  102. data/spec/models/recording_small_dto_spec.rb +2 -2
  103. data/spec/models/recording_tag_small_dto_spec.rb +2 -2
  104. data/spec/models/save_user_dto_spec.rb +2 -2
  105. data/spec/models/search_filter_values_dto_spec.rb +8 -2
  106. data/spec/models/sign_up_dto_spec.rb +2 -2
  107. data/spec/models/tag_dto_spec.rb +2 -2
  108. data/spec/models/tag_small_dto_spec.rb +2 -2
  109. data/spec/models/taggram_dto_spec.rb +2 -2
  110. data/spec/models/tags_summary_dto_spec.rb +2 -2
  111. data/spec/models/tagstrength_dto_spec.rb +2 -2
  112. data/spec/models/title_dto_spec.rb +2 -2
  113. data/spec/models/token_request_spec.rb +2 -2
  114. data/spec/models/track_dto_spec.rb +2 -2
  115. data/spec/models/update_password_dto_spec.rb +2 -2
  116. data/spec/models/user_dto_spec.rb +8 -2
  117. data/spec/models/video_recognition_response_spec.rb +2 -2
  118. data/spec/spec_helper.rb +2 -2
  119. metadata +55 -57
  120. data/docs/CuratePlaylistDTO.md +0 -26
  121. data/docs/CuratePlaylistResponseDTO.md +0 -18
  122. data/docs/PlaylistApi.md +0 -77
  123. data/docs/SearchRecordingGranularDTO.md +0 -20
  124. data/lib/songtradr_api_client_ruby/api/playlist_api.rb +0 -99
  125. data/lib/songtradr_api_client_ruby/models/curate_playlist_dto.rb +0 -256
  126. data/lib/songtradr_api_client_ruby/models/curate_playlist_response_dto.rb +0 -216
  127. data/lib/songtradr_api_client_ruby/models/search_recording_granular_dto.rb +0 -232
  128. data/spec/api/playlist_api_spec.rb +0 -47
  129. data/spec/models/curate_playlist_dto_spec.rb +0 -60
  130. data/spec/models/curate_playlist_response_dto_spec.rb +0 -36
  131. data/spec/models/search_recording_granular_dto_spec.rb +0 -42
@@ -1,256 +0,0 @@
1
- =begin
2
- #Songtradr API
3
-
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
-
6
- The version of the OpenAPI document: 1.17.0
7
- Contact: info@songtradr.com
8
- Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 7.3.0-SNAPSHOT
10
-
11
- =end
12
-
13
- require 'date'
14
- require 'time'
15
-
16
- module SongtradrApiClientRuby
17
- class CuratePlaylistDTO
18
- attr_accessor :request_data
19
-
20
- attr_accessor :usage_filter
21
-
22
- attr_accessor :numerical_filter
23
-
24
- attr_accessor :category_filter
25
-
26
- attr_accessor :first_id
27
-
28
- # Attribute mapping from ruby-style variable name to JSON key.
29
- def self.attribute_map
30
- {
31
- :'request_data' => :'requestData',
32
- :'usage_filter' => :'usageFilter',
33
- :'numerical_filter' => :'numericalFilter',
34
- :'category_filter' => :'categoryFilter',
35
- :'first_id' => :'firstId'
36
- }
37
- end
38
-
39
- # Returns all the JSON keys this model knows about
40
- def self.acceptable_attributes
41
- attribute_map.values
42
- end
43
-
44
- # Attribute type mapping.
45
- def self.openapi_types
46
- {
47
- :'request_data' => :'Array<String>',
48
- :'usage_filter' => :'String',
49
- :'numerical_filter' => :'Hash<String, String>',
50
- :'category_filter' => :'Hash<String, String>',
51
- :'first_id' => :'String'
52
- }
53
- end
54
-
55
- # List of attributes with nullable: true
56
- def self.openapi_nullable
57
- Set.new([
58
- ])
59
- end
60
-
61
- # Initializes the object
62
- # @param [Hash] attributes Model attributes in the form of hash
63
- def initialize(attributes = {})
64
- if (!attributes.is_a?(Hash))
65
- fail ArgumentError, "The input argument (attributes) must be a hash in `SongtradrApiClientRuby::CuratePlaylistDTO` initialize method"
66
- end
67
-
68
- # check to see if the attribute exists and convert string to symbol for hash key
69
- attributes = attributes.each_with_object({}) { |(k, v), h|
70
- if (!self.class.attribute_map.key?(k.to_sym))
71
- fail ArgumentError, "`#{k}` is not a valid attribute in `SongtradrApiClientRuby::CuratePlaylistDTO`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
72
- end
73
- h[k.to_sym] = v
74
- }
75
-
76
- if attributes.key?(:'request_data')
77
- if (value = attributes[:'request_data']).is_a?(Array)
78
- self.request_data = value
79
- end
80
- end
81
-
82
- if attributes.key?(:'usage_filter')
83
- self.usage_filter = attributes[:'usage_filter']
84
- end
85
-
86
- if attributes.key?(:'numerical_filter')
87
- if (value = attributes[:'numerical_filter']).is_a?(Hash)
88
- self.numerical_filter = value
89
- end
90
- end
91
-
92
- if attributes.key?(:'category_filter')
93
- if (value = attributes[:'category_filter']).is_a?(Hash)
94
- self.category_filter = value
95
- end
96
- end
97
-
98
- if attributes.key?(:'first_id')
99
- self.first_id = attributes[:'first_id']
100
- end
101
- end
102
-
103
- # Show invalid properties with the reasons. Usually used together with valid?
104
- # @return Array for valid properties with the reasons
105
- def list_invalid_properties
106
- warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
107
- invalid_properties = Array.new
108
- invalid_properties
109
- end
110
-
111
- # Check to see if the all the properties in the model are valid
112
- # @return true if the model is valid
113
- def valid?
114
- warn '[DEPRECATED] the `valid?` method is obsolete'
115
- true
116
- end
117
-
118
- # Checks equality by comparing each attribute.
119
- # @param [Object] Object to be compared
120
- def ==(o)
121
- return true if self.equal?(o)
122
- self.class == o.class &&
123
- request_data == o.request_data &&
124
- usage_filter == o.usage_filter &&
125
- numerical_filter == o.numerical_filter &&
126
- category_filter == o.category_filter &&
127
- first_id == o.first_id
128
- end
129
-
130
- # @see the `==` method
131
- # @param [Object] Object to be compared
132
- def eql?(o)
133
- self == o
134
- end
135
-
136
- # Calculates hash code according to all attributes.
137
- # @return [Integer] Hash code
138
- def hash
139
- [request_data, usage_filter, numerical_filter, category_filter, first_id].hash
140
- end
141
-
142
- # Builds the object from hash
143
- # @param [Hash] attributes Model attributes in the form of hash
144
- # @return [Object] Returns the model itself
145
- def self.build_from_hash(attributes)
146
- return nil unless attributes.is_a?(Hash)
147
- attributes = attributes.transform_keys(&:to_sym)
148
- transformed_hash = {}
149
- openapi_types.each_pair do |key, type|
150
- if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
151
- transformed_hash["#{key}"] = nil
152
- elsif type =~ /\AArray<(.*)>/i
153
- # check to ensure the input is an array given that the attribute
154
- # is documented as an array but the input is not
155
- if attributes[attribute_map[key]].is_a?(Array)
156
- transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
157
- end
158
- elsif !attributes[attribute_map[key]].nil?
159
- transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
160
- end
161
- end
162
- new(transformed_hash)
163
- end
164
-
165
- # Deserializes the data based on type
166
- # @param string type Data type
167
- # @param string value Value to be deserialized
168
- # @return [Object] Deserialized data
169
- def self._deserialize(type, value)
170
- case type.to_sym
171
- when :Time
172
- Time.parse(value)
173
- when :Date
174
- Date.parse(value)
175
- when :String
176
- value.to_s
177
- when :Integer
178
- value.to_i
179
- when :Float
180
- value.to_f
181
- when :Boolean
182
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
183
- true
184
- else
185
- false
186
- end
187
- when :Object
188
- # generic object (usually a Hash), return directly
189
- value
190
- when /\AArray<(?<inner_type>.+)>\z/
191
- inner_type = Regexp.last_match[:inner_type]
192
- value.map { |v| _deserialize(inner_type, v) }
193
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
194
- k_type = Regexp.last_match[:k_type]
195
- v_type = Regexp.last_match[:v_type]
196
- {}.tap do |hash|
197
- value.each do |k, v|
198
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
199
- end
200
- end
201
- else # model
202
- # models (e.g. Pet) or oneOf
203
- klass = SongtradrApiClientRuby.const_get(type)
204
- klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
205
- end
206
- end
207
-
208
- # Returns the string representation of the object
209
- # @return [String] String presentation of the object
210
- def to_s
211
- to_hash.to_s
212
- end
213
-
214
- # to_body is an alias to to_hash (backward compatibility)
215
- # @return [Hash] Returns the object in the form of hash
216
- def to_body
217
- to_hash
218
- end
219
-
220
- # Returns the object in the form of hash
221
- # @return [Hash] Returns the object in the form of hash
222
- def to_hash
223
- hash = {}
224
- self.class.attribute_map.each_pair do |attr, param|
225
- value = self.send(attr)
226
- if value.nil?
227
- is_nullable = self.class.openapi_nullable.include?(attr)
228
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
229
- end
230
-
231
- hash[param] = _to_hash(value)
232
- end
233
- hash
234
- end
235
-
236
- # Outputs non-array value in the form of hash
237
- # For object, use to_hash. Otherwise, just return the value
238
- # @param [Object] value Any valid value
239
- # @return [Hash] Returns the value in the form of hash
240
- def _to_hash(value)
241
- if value.is_a?(Array)
242
- value.compact.map { |v| _to_hash(v) }
243
- elsif value.is_a?(Hash)
244
- {}.tap do |hash|
245
- value.each { |k, v| hash[k] = _to_hash(v) }
246
- end
247
- elsif value.respond_to? :to_hash
248
- value.to_hash
249
- else
250
- value
251
- end
252
- end
253
-
254
- end
255
-
256
- end
@@ -1,216 +0,0 @@
1
- =begin
2
- #Songtradr API
3
-
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
-
6
- The version of the OpenAPI document: 1.17.0
7
- Contact: info@songtradr.com
8
- Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 7.3.0-SNAPSHOT
10
-
11
- =end
12
-
13
- require 'date'
14
- require 'time'
15
-
16
- module SongtradrApiClientRuby
17
- class CuratePlaylistResponseDTO
18
- attr_accessor :songtradr_track_ids
19
-
20
- # Attribute mapping from ruby-style variable name to JSON key.
21
- def self.attribute_map
22
- {
23
- :'songtradr_track_ids' => :'songtradrTrackIds'
24
- }
25
- end
26
-
27
- # Returns all the JSON keys this model knows about
28
- def self.acceptable_attributes
29
- attribute_map.values
30
- end
31
-
32
- # Attribute type mapping.
33
- def self.openapi_types
34
- {
35
- :'songtradr_track_ids' => :'Array<String>'
36
- }
37
- end
38
-
39
- # List of attributes with nullable: true
40
- def self.openapi_nullable
41
- Set.new([
42
- ])
43
- end
44
-
45
- # Initializes the object
46
- # @param [Hash] attributes Model attributes in the form of hash
47
- def initialize(attributes = {})
48
- if (!attributes.is_a?(Hash))
49
- fail ArgumentError, "The input argument (attributes) must be a hash in `SongtradrApiClientRuby::CuratePlaylistResponseDTO` initialize method"
50
- end
51
-
52
- # check to see if the attribute exists and convert string to symbol for hash key
53
- attributes = attributes.each_with_object({}) { |(k, v), h|
54
- if (!self.class.attribute_map.key?(k.to_sym))
55
- fail ArgumentError, "`#{k}` is not a valid attribute in `SongtradrApiClientRuby::CuratePlaylistResponseDTO`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
56
- end
57
- h[k.to_sym] = v
58
- }
59
-
60
- if attributes.key?(:'songtradr_track_ids')
61
- if (value = attributes[:'songtradr_track_ids']).is_a?(Array)
62
- self.songtradr_track_ids = value
63
- end
64
- end
65
- end
66
-
67
- # Show invalid properties with the reasons. Usually used together with valid?
68
- # @return Array for valid properties with the reasons
69
- def list_invalid_properties
70
- warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
71
- invalid_properties = Array.new
72
- invalid_properties
73
- end
74
-
75
- # Check to see if the all the properties in the model are valid
76
- # @return true if the model is valid
77
- def valid?
78
- warn '[DEPRECATED] the `valid?` method is obsolete'
79
- true
80
- end
81
-
82
- # Checks equality by comparing each attribute.
83
- # @param [Object] Object to be compared
84
- def ==(o)
85
- return true if self.equal?(o)
86
- self.class == o.class &&
87
- songtradr_track_ids == o.songtradr_track_ids
88
- end
89
-
90
- # @see the `==` method
91
- # @param [Object] Object to be compared
92
- def eql?(o)
93
- self == o
94
- end
95
-
96
- # Calculates hash code according to all attributes.
97
- # @return [Integer] Hash code
98
- def hash
99
- [songtradr_track_ids].hash
100
- end
101
-
102
- # Builds the object from hash
103
- # @param [Hash] attributes Model attributes in the form of hash
104
- # @return [Object] Returns the model itself
105
- def self.build_from_hash(attributes)
106
- return nil unless attributes.is_a?(Hash)
107
- attributes = attributes.transform_keys(&:to_sym)
108
- transformed_hash = {}
109
- openapi_types.each_pair do |key, type|
110
- if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
111
- transformed_hash["#{key}"] = nil
112
- elsif type =~ /\AArray<(.*)>/i
113
- # check to ensure the input is an array given that the attribute
114
- # is documented as an array but the input is not
115
- if attributes[attribute_map[key]].is_a?(Array)
116
- transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
117
- end
118
- elsif !attributes[attribute_map[key]].nil?
119
- transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
120
- end
121
- end
122
- new(transformed_hash)
123
- end
124
-
125
- # Deserializes the data based on type
126
- # @param string type Data type
127
- # @param string value Value to be deserialized
128
- # @return [Object] Deserialized data
129
- def self._deserialize(type, value)
130
- case type.to_sym
131
- when :Time
132
- Time.parse(value)
133
- when :Date
134
- Date.parse(value)
135
- when :String
136
- value.to_s
137
- when :Integer
138
- value.to_i
139
- when :Float
140
- value.to_f
141
- when :Boolean
142
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
143
- true
144
- else
145
- false
146
- end
147
- when :Object
148
- # generic object (usually a Hash), return directly
149
- value
150
- when /\AArray<(?<inner_type>.+)>\z/
151
- inner_type = Regexp.last_match[:inner_type]
152
- value.map { |v| _deserialize(inner_type, v) }
153
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
154
- k_type = Regexp.last_match[:k_type]
155
- v_type = Regexp.last_match[:v_type]
156
- {}.tap do |hash|
157
- value.each do |k, v|
158
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
159
- end
160
- end
161
- else # model
162
- # models (e.g. Pet) or oneOf
163
- klass = SongtradrApiClientRuby.const_get(type)
164
- klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
165
- end
166
- end
167
-
168
- # Returns the string representation of the object
169
- # @return [String] String presentation of the object
170
- def to_s
171
- to_hash.to_s
172
- end
173
-
174
- # to_body is an alias to to_hash (backward compatibility)
175
- # @return [Hash] Returns the object in the form of hash
176
- def to_body
177
- to_hash
178
- end
179
-
180
- # Returns the object in the form of hash
181
- # @return [Hash] Returns the object in the form of hash
182
- def to_hash
183
- hash = {}
184
- self.class.attribute_map.each_pair do |attr, param|
185
- value = self.send(attr)
186
- if value.nil?
187
- is_nullable = self.class.openapi_nullable.include?(attr)
188
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
189
- end
190
-
191
- hash[param] = _to_hash(value)
192
- end
193
- hash
194
- end
195
-
196
- # Outputs non-array value in the form of hash
197
- # For object, use to_hash. Otherwise, just return the value
198
- # @param [Object] value Any valid value
199
- # @return [Hash] Returns the value in the form of hash
200
- def _to_hash(value)
201
- if value.is_a?(Array)
202
- value.compact.map { |v| _to_hash(v) }
203
- elsif value.is_a?(Hash)
204
- {}.tap do |hash|
205
- value.each { |k, v| hash[k] = _to_hash(v) }
206
- end
207
- elsif value.respond_to? :to_hash
208
- value.to_hash
209
- else
210
- value
211
- end
212
- end
213
-
214
- end
215
-
216
- end
@@ -1,232 +0,0 @@
1
- =begin
2
- #Songtradr API
3
-
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
-
6
- The version of the OpenAPI document: 1.17.0
7
- Contact: info@songtradr.com
8
- Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 7.3.0-SNAPSHOT
10
-
11
- =end
12
-
13
- require 'date'
14
- require 'time'
15
-
16
- module SongtradrApiClientRuby
17
- # Timeseries of tags.
18
- class SearchRecordingGranularDTO
19
- # Strength of presence of the corresponding category, tag or genre.
20
- attr_accessor :strength
21
-
22
- attr_accessor :tag_name
23
-
24
- # Attribute mapping from ruby-style variable name to JSON key.
25
- def self.attribute_map
26
- {
27
- :'strength' => :'strength',
28
- :'tag_name' => :'tagName'
29
- }
30
- end
31
-
32
- # Returns all the JSON keys this model knows about
33
- def self.acceptable_attributes
34
- attribute_map.values
35
- end
36
-
37
- # Attribute type mapping.
38
- def self.openapi_types
39
- {
40
- :'strength' => :'Float',
41
- :'tag_name' => :'String'
42
- }
43
- end
44
-
45
- # List of attributes with nullable: true
46
- def self.openapi_nullable
47
- Set.new([
48
- ])
49
- end
50
-
51
- # Initializes the object
52
- # @param [Hash] attributes Model attributes in the form of hash
53
- def initialize(attributes = {})
54
- if (!attributes.is_a?(Hash))
55
- fail ArgumentError, "The input argument (attributes) must be a hash in `SongtradrApiClientRuby::SearchRecordingGranularDTO` initialize method"
56
- end
57
-
58
- # check to see if the attribute exists and convert string to symbol for hash key
59
- attributes = attributes.each_with_object({}) { |(k, v), h|
60
- if (!self.class.attribute_map.key?(k.to_sym))
61
- fail ArgumentError, "`#{k}` is not a valid attribute in `SongtradrApiClientRuby::SearchRecordingGranularDTO`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
62
- end
63
- h[k.to_sym] = v
64
- }
65
-
66
- if attributes.key?(:'strength')
67
- self.strength = attributes[:'strength']
68
- end
69
-
70
- if attributes.key?(:'tag_name')
71
- self.tag_name = attributes[:'tag_name']
72
- else
73
- self.tag_name = nil
74
- end
75
- end
76
-
77
- # Show invalid properties with the reasons. Usually used together with valid?
78
- # @return Array for valid properties with the reasons
79
- def list_invalid_properties
80
- warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
81
- invalid_properties = Array.new
82
- if @tag_name.nil?
83
- invalid_properties.push('invalid value for "tag_name", tag_name cannot be nil.')
84
- end
85
-
86
- invalid_properties
87
- end
88
-
89
- # Check to see if the all the properties in the model are valid
90
- # @return true if the model is valid
91
- def valid?
92
- warn '[DEPRECATED] the `valid?` method is obsolete'
93
- return false if @tag_name.nil?
94
- true
95
- end
96
-
97
- # Checks equality by comparing each attribute.
98
- # @param [Object] Object to be compared
99
- def ==(o)
100
- return true if self.equal?(o)
101
- self.class == o.class &&
102
- strength == o.strength &&
103
- tag_name == o.tag_name
104
- end
105
-
106
- # @see the `==` method
107
- # @param [Object] Object to be compared
108
- def eql?(o)
109
- self == o
110
- end
111
-
112
- # Calculates hash code according to all attributes.
113
- # @return [Integer] Hash code
114
- def hash
115
- [strength, tag_name].hash
116
- end
117
-
118
- # Builds the object from hash
119
- # @param [Hash] attributes Model attributes in the form of hash
120
- # @return [Object] Returns the model itself
121
- def self.build_from_hash(attributes)
122
- return nil unless attributes.is_a?(Hash)
123
- attributes = attributes.transform_keys(&:to_sym)
124
- transformed_hash = {}
125
- openapi_types.each_pair do |key, type|
126
- if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
127
- transformed_hash["#{key}"] = nil
128
- elsif type =~ /\AArray<(.*)>/i
129
- # check to ensure the input is an array given that the attribute
130
- # is documented as an array but the input is not
131
- if attributes[attribute_map[key]].is_a?(Array)
132
- transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
133
- end
134
- elsif !attributes[attribute_map[key]].nil?
135
- transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
136
- end
137
- end
138
- new(transformed_hash)
139
- end
140
-
141
- # Deserializes the data based on type
142
- # @param string type Data type
143
- # @param string value Value to be deserialized
144
- # @return [Object] Deserialized data
145
- def self._deserialize(type, value)
146
- case type.to_sym
147
- when :Time
148
- Time.parse(value)
149
- when :Date
150
- Date.parse(value)
151
- when :String
152
- value.to_s
153
- when :Integer
154
- value.to_i
155
- when :Float
156
- value.to_f
157
- when :Boolean
158
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
159
- true
160
- else
161
- false
162
- end
163
- when :Object
164
- # generic object (usually a Hash), return directly
165
- value
166
- when /\AArray<(?<inner_type>.+)>\z/
167
- inner_type = Regexp.last_match[:inner_type]
168
- value.map { |v| _deserialize(inner_type, v) }
169
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
170
- k_type = Regexp.last_match[:k_type]
171
- v_type = Regexp.last_match[:v_type]
172
- {}.tap do |hash|
173
- value.each do |k, v|
174
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
175
- end
176
- end
177
- else # model
178
- # models (e.g. Pet) or oneOf
179
- klass = SongtradrApiClientRuby.const_get(type)
180
- klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
181
- end
182
- end
183
-
184
- # Returns the string representation of the object
185
- # @return [String] String presentation of the object
186
- def to_s
187
- to_hash.to_s
188
- end
189
-
190
- # to_body is an alias to to_hash (backward compatibility)
191
- # @return [Hash] Returns the object in the form of hash
192
- def to_body
193
- to_hash
194
- end
195
-
196
- # Returns the object in the form of hash
197
- # @return [Hash] Returns the object in the form of hash
198
- def to_hash
199
- hash = {}
200
- self.class.attribute_map.each_pair do |attr, param|
201
- value = self.send(attr)
202
- if value.nil?
203
- is_nullable = self.class.openapi_nullable.include?(attr)
204
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
205
- end
206
-
207
- hash[param] = _to_hash(value)
208
- end
209
- hash
210
- end
211
-
212
- # Outputs non-array value in the form of hash
213
- # For object, use to_hash. Otherwise, just return the value
214
- # @param [Object] value Any valid value
215
- # @return [Hash] Returns the value in the form of hash
216
- def _to_hash(value)
217
- if value.is_a?(Array)
218
- value.compact.map { |v| _to_hash(v) }
219
- elsif value.is_a?(Hash)
220
- {}.tap do |hash|
221
- value.each { |k, v| hash[k] = _to_hash(v) }
222
- end
223
- elsif value.respond_to? :to_hash
224
- value.to_hash
225
- else
226
- value
227
- end
228
- end
229
-
230
- end
231
-
232
- end