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
@@ -60,12 +60,15 @@ module SongtradrApiClientRuby
60
60
 
61
61
  if attributes.key?(:'type_name')
62
62
  self.type_name = attributes[:'type_name']
63
+ else
64
+ self.type_name = nil
63
65
  end
64
66
  end
65
67
 
66
68
  # Show invalid properties with the reasons. Usually used together with valid?
67
69
  # @return Array for valid properties with the reasons
68
70
  def list_invalid_properties
71
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
69
72
  invalid_properties = Array.new
70
73
  if @type_name.nil?
71
74
  invalid_properties.push('invalid value for "type_name", type_name cannot be nil.')
@@ -77,6 +80,7 @@ module SongtradrApiClientRuby
77
80
  # Check to see if the all the properties in the model are valid
78
81
  # @return true if the model is valid
79
82
  def valid?
83
+ warn '[DEPRECATED] the `valid?` method is obsolete'
80
84
  return false if @type_name.nil?
81
85
  true
82
86
  end
@@ -105,37 +109,30 @@ module SongtradrApiClientRuby
105
109
  # @param [Hash] attributes Model attributes in the form of hash
106
110
  # @return [Object] Returns the model itself
107
111
  def self.build_from_hash(attributes)
108
- new.build_from_hash(attributes)
109
- end
110
-
111
- # Builds the object from hash
112
- # @param [Hash] attributes Model attributes in the form of hash
113
- # @return [Object] Returns the model itself
114
- def build_from_hash(attributes)
115
112
  return nil unless attributes.is_a?(Hash)
116
113
  attributes = attributes.transform_keys(&:to_sym)
117
- self.class.openapi_types.each_pair do |key, type|
118
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
119
- self.send("#{key}=", nil)
114
+ transformed_hash = {}
115
+ openapi_types.each_pair do |key, type|
116
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
117
+ transformed_hash["#{key}"] = nil
120
118
  elsif type =~ /\AArray<(.*)>/i
121
119
  # check to ensure the input is an array given that the attribute
122
120
  # is documented as an array but the input is not
123
- if attributes[self.class.attribute_map[key]].is_a?(Array)
124
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
121
+ if attributes[attribute_map[key]].is_a?(Array)
122
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
125
123
  end
126
- elsif !attributes[self.class.attribute_map[key]].nil?
127
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
124
+ elsif !attributes[attribute_map[key]].nil?
125
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
128
126
  end
129
127
  end
130
-
131
- self
128
+ new(transformed_hash)
132
129
  end
133
130
 
134
131
  # Deserializes the data based on type
135
132
  # @param string type Data type
136
133
  # @param string value Value to be deserialized
137
134
  # @return [Object] Deserialized data
138
- def _deserialize(type, value)
135
+ def self._deserialize(type, value)
139
136
  case type.to_sym
140
137
  when :Time
141
138
  Time.parse(value)
@@ -0,0 +1,214 @@
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.12.24
7
+ Contact: info@songtradr.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 7.0.0-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module SongtradrApiClientRuby
17
+ class CreateApiKeyDTO
18
+ attr_accessor :name
19
+
20
+ # Attribute mapping from ruby-style variable name to JSON key.
21
+ def self.attribute_map
22
+ {
23
+ :'name' => :'name'
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
+ :'name' => :'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::CreateApiKeyDTO` 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::CreateApiKeyDTO`. 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?(:'name')
61
+ self.name = attributes[:'name']
62
+ end
63
+ end
64
+
65
+ # Show invalid properties with the reasons. Usually used together with valid?
66
+ # @return Array for valid properties with the reasons
67
+ def list_invalid_properties
68
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
69
+ invalid_properties = Array.new
70
+ invalid_properties
71
+ end
72
+
73
+ # Check to see if the all the properties in the model are valid
74
+ # @return true if the model is valid
75
+ def valid?
76
+ warn '[DEPRECATED] the `valid?` method is obsolete'
77
+ true
78
+ end
79
+
80
+ # Checks equality by comparing each attribute.
81
+ # @param [Object] Object to be compared
82
+ def ==(o)
83
+ return true if self.equal?(o)
84
+ self.class == o.class &&
85
+ name == o.name
86
+ end
87
+
88
+ # @see the `==` method
89
+ # @param [Object] Object to be compared
90
+ def eql?(o)
91
+ self == o
92
+ end
93
+
94
+ # Calculates hash code according to all attributes.
95
+ # @return [Integer] Hash code
96
+ def hash
97
+ [name].hash
98
+ end
99
+
100
+ # Builds the object from hash
101
+ # @param [Hash] attributes Model attributes in the form of hash
102
+ # @return [Object] Returns the model itself
103
+ def self.build_from_hash(attributes)
104
+ return nil unless attributes.is_a?(Hash)
105
+ attributes = attributes.transform_keys(&:to_sym)
106
+ transformed_hash = {}
107
+ openapi_types.each_pair do |key, type|
108
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
109
+ transformed_hash["#{key}"] = nil
110
+ elsif type =~ /\AArray<(.*)>/i
111
+ # check to ensure the input is an array given that the attribute
112
+ # is documented as an array but the input is not
113
+ if attributes[attribute_map[key]].is_a?(Array)
114
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
115
+ end
116
+ elsif !attributes[attribute_map[key]].nil?
117
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
118
+ end
119
+ end
120
+ new(transformed_hash)
121
+ end
122
+
123
+ # Deserializes the data based on type
124
+ # @param string type Data type
125
+ # @param string value Value to be deserialized
126
+ # @return [Object] Deserialized data
127
+ def self._deserialize(type, value)
128
+ case type.to_sym
129
+ when :Time
130
+ Time.parse(value)
131
+ when :Date
132
+ Date.parse(value)
133
+ when :String
134
+ value.to_s
135
+ when :Integer
136
+ value.to_i
137
+ when :Float
138
+ value.to_f
139
+ when :Boolean
140
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
141
+ true
142
+ else
143
+ false
144
+ end
145
+ when :Object
146
+ # generic object (usually a Hash), return directly
147
+ value
148
+ when /\AArray<(?<inner_type>.+)>\z/
149
+ inner_type = Regexp.last_match[:inner_type]
150
+ value.map { |v| _deserialize(inner_type, v) }
151
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
152
+ k_type = Regexp.last_match[:k_type]
153
+ v_type = Regexp.last_match[:v_type]
154
+ {}.tap do |hash|
155
+ value.each do |k, v|
156
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
157
+ end
158
+ end
159
+ else # model
160
+ # models (e.g. Pet) or oneOf
161
+ klass = SongtradrApiClientRuby.const_get(type)
162
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
163
+ end
164
+ end
165
+
166
+ # Returns the string representation of the object
167
+ # @return [String] String presentation of the object
168
+ def to_s
169
+ to_hash.to_s
170
+ end
171
+
172
+ # to_body is an alias to to_hash (backward compatibility)
173
+ # @return [Hash] Returns the object in the form of hash
174
+ def to_body
175
+ to_hash
176
+ end
177
+
178
+ # Returns the object in the form of hash
179
+ # @return [Hash] Returns the object in the form of hash
180
+ def to_hash
181
+ hash = {}
182
+ self.class.attribute_map.each_pair do |attr, param|
183
+ value = self.send(attr)
184
+ if value.nil?
185
+ is_nullable = self.class.openapi_nullable.include?(attr)
186
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
187
+ end
188
+
189
+ hash[param] = _to_hash(value)
190
+ end
191
+ hash
192
+ end
193
+
194
+ # Outputs non-array value in the form of hash
195
+ # For object, use to_hash. Otherwise, just return the value
196
+ # @param [Object] value Any valid value
197
+ # @return [Hash] Returns the value in the form of hash
198
+ def _to_hash(value)
199
+ if value.is_a?(Array)
200
+ value.compact.map { |v| _to_hash(v) }
201
+ elsif value.is_a?(Hash)
202
+ {}.tap do |hash|
203
+ value.each { |k, v| hash[k] = _to_hash(v) }
204
+ end
205
+ elsif value.respond_to? :to_hash
206
+ value.to_hash
207
+ else
208
+ value
209
+ end
210
+ end
211
+
212
+ end
213
+
214
+ end
@@ -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
@@ -81,14 +81,20 @@ module SongtradrApiClientRuby
81
81
 
82
82
  if attributes.key?(:'timestamp')
83
83
  self.timestamp = attributes[:'timestamp']
84
+ else
85
+ self.timestamp = nil
84
86
  end
85
87
 
86
88
  if attributes.key?(:'status')
87
89
  self.status = attributes[:'status']
90
+ else
91
+ self.status = nil
88
92
  end
89
93
 
90
94
  if attributes.key?(:'error')
91
95
  self.error = attributes[:'error']
96
+ else
97
+ self.error = nil
92
98
  end
93
99
 
94
100
  if attributes.key?(:'message')
@@ -103,6 +109,7 @@ module SongtradrApiClientRuby
103
109
  # Show invalid properties with the reasons. Usually used together with valid?
104
110
  # @return Array for valid properties with the reasons
105
111
  def list_invalid_properties
112
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
106
113
  invalid_properties = Array.new
107
114
  if @timestamp.nil?
108
115
  invalid_properties.push('invalid value for "timestamp", timestamp cannot be nil.')
@@ -122,6 +129,7 @@ module SongtradrApiClientRuby
122
129
  # Check to see if the all the properties in the model are valid
123
130
  # @return true if the model is valid
124
131
  def valid?
132
+ warn '[DEPRECATED] the `valid?` method is obsolete'
125
133
  return false if @timestamp.nil?
126
134
  return false if @status.nil?
127
135
  return false if @error.nil?
@@ -156,37 +164,30 @@ module SongtradrApiClientRuby
156
164
  # @param [Hash] attributes Model attributes in the form of hash
157
165
  # @return [Object] Returns the model itself
158
166
  def self.build_from_hash(attributes)
159
- new.build_from_hash(attributes)
160
- end
161
-
162
- # Builds the object from hash
163
- # @param [Hash] attributes Model attributes in the form of hash
164
- # @return [Object] Returns the model itself
165
- def build_from_hash(attributes)
166
167
  return nil unless attributes.is_a?(Hash)
167
168
  attributes = attributes.transform_keys(&:to_sym)
168
- self.class.openapi_types.each_pair do |key, type|
169
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
170
- self.send("#{key}=", nil)
169
+ transformed_hash = {}
170
+ openapi_types.each_pair do |key, type|
171
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
172
+ transformed_hash["#{key}"] = nil
171
173
  elsif type =~ /\AArray<(.*)>/i
172
174
  # check to ensure the input is an array given that the attribute
173
175
  # is documented as an array but the input is not
174
- if attributes[self.class.attribute_map[key]].is_a?(Array)
175
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
176
+ if attributes[attribute_map[key]].is_a?(Array)
177
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
176
178
  end
177
- elsif !attributes[self.class.attribute_map[key]].nil?
178
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
179
+ elsif !attributes[attribute_map[key]].nil?
180
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
179
181
  end
180
182
  end
181
-
182
- self
183
+ new(transformed_hash)
183
184
  end
184
185
 
185
186
  # Deserializes the data based on type
186
187
  # @param string type Data type
187
188
  # @param string value Value to be deserialized
188
189
  # @return [Object] Deserialized data
189
- def _deserialize(type, value)
190
+ def self._deserialize(type, value)
190
191
  case type.to_sym
191
192
  when :Time
192
193
  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
@@ -68,20 +68,27 @@ module SongtradrApiClientRuby
68
68
 
69
69
  if attributes.key?(:'field_value')
70
70
  self.field_value = attributes[:'field_value']
71
+ else
72
+ self.field_value = nil
71
73
  end
72
74
 
73
75
  if attributes.key?(:'total')
74
76
  self.total = attributes[:'total']
77
+ else
78
+ self.total = nil
75
79
  end
76
80
 
77
81
  if attributes.key?(:'field_name')
78
82
  self.field_name = attributes[:'field_name']
83
+ else
84
+ self.field_name = 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 @field_value.nil?
87
94
  invalid_properties.push('invalid value for "field_value", field_value 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 @field_value.nil?
105
113
  return false if @total.nil?
106
114
  return false if @field_name.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
- self.class.openapi_types.each_pair do |key, type|
146
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
147
- self.send("#{key}=", nil)
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[self.class.attribute_map[key]].is_a?(Array)
152
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
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[self.class.attribute_map[key]].nil?
155
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
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.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
@@ -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
- self.class.openapi_types.each_pair do |key, type|
343
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
344
- self.send("#{key}=", nil)
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[self.class.attribute_map[key]].is_a?(Array)
349
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
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[self.class.attribute_map[key]].nil?
352
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
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)