songtradr_api_client_ruby 1.12.22 → 1.12.24
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.
- checksums.yaml +4 -4
- data/Gemfile.lock +4 -4
- data/README.md +26 -12
- data/docs/APIKeysApi.md +217 -0
- data/docs/AdminApiUserDTO.md +70 -0
- data/docs/AllowedValuesApi.md +2 -2
- data/docs/ApiKeyDTO.md +24 -0
- data/docs/CreateApiKeyDTO.md +18 -0
- data/docs/FileSmallDTO.md +16 -16
- data/docs/MusicalFeaturesDTO.md +82 -82
- data/docs/PlaylistLargeDTO.md +9 -9
- data/docs/ProductMediumDTO.md +2 -2
- data/docs/RecordingApi.md +2 -0
- data/docs/RecordingGenrePredictionDTO.md +3 -3
- data/docs/RecordingLargeDTO.md +11 -11
- data/docs/RecordingMediumDTO.md +7 -7
- data/docs/RecordingMinimalWithMusicalFeaturesDTO.md +3 -3
- data/docs/RecordingPlaylistDTO.md +3 -3
- data/docs/RecordingSmallDTO.md +3 -3
- data/docs/UserApi.md +4 -0
- data/docs/UserDTO.md +20 -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 +213 -0
- 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 +4 -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 +448 -0
- data/lib/songtradr_api_client_ruby/models/api_key_dto.rb +262 -0
- data/lib/songtradr_api_client_ruby/models/category_medium_dto.rb +17 -18
- 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 +214 -0
- 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 +81 -76
- 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 +529 -534
- 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 +54 -57
- data/lib/songtradr_api_client_ruby/models/product_medium_dto.rb +35 -28
- 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 +37 -36
- data/lib/songtradr_api_client_ruby/models/recording_large_dto.rb +94 -77
- data/lib/songtradr_api_client_ruby/models/recording_list_dto.rb +21 -18
- data/lib/songtradr_api_client_ruby/models/recording_medium_dto.rb +64 -51
- 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 +26 -31
- 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_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 +210 -19
- data/lib/songtradr_api_client_ruby/version.rb +2 -2
- data/lib/songtradr_api_client_ruby.rb +5 -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 +70 -0
- 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 +2 -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 +190 -0
- data/spec/models/api_key_dto_spec.rb +52 -0
- data/spec/models/category_medium_dto_spec.rb +1 -1
- 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 +34 -0
- 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 +15 -15
- 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 +175 -175
- 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 +10 -10
- 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 +3 -3
- data/spec/models/recording_large_dto_spec.rb +12 -12
- data/spec/models/recording_list_dto_spec.rb +1 -1
- data/spec/models/recording_medium_dto_spec.rb +9 -9
- 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 +4 -4
- 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_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 +61 -1
- data/spec/spec_helper.rb +1 -1
- 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.
|
|
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
|
-
|
|
118
|
-
|
|
119
|
-
|
|
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[
|
|
124
|
-
|
|
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[
|
|
127
|
-
|
|
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.
|
|
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
|
-
|
|
169
|
-
|
|
170
|
-
|
|
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[
|
|
175
|
-
|
|
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[
|
|
178
|
-
|
|
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.
|
|
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
|
-
|
|
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.12.
|
|
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
|
-
|
|
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)
|