songtradr_api_client_ruby 1.13.7 → 1.16.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (243) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +5 -5
  3. data/README.md +5 -37
  4. data/docs/FileSmallDTO.md +2 -2
  5. data/docs/MusicalFeaturesDTO.md +25 -25
  6. data/docs/PlaylistApi.md +0 -214
  7. data/docs/RecordingApi.md +2 -204
  8. data/docs/RecordingGenrePredictionDTO.md +3 -3
  9. data/docs/RecordingMediumDTO.md +2 -2
  10. data/docs/RecordingPartyDTO.md +3 -3
  11. data/docs/UserApi.md +8 -456
  12. data/lib/songtradr_api_client_ruby/api/allowed_values_api.rb +2 -2
  13. data/lib/songtradr_api_client_ruby/api/playlist_api.rb +2 -202
  14. data/lib/songtradr_api_client_ruby/api/recording_api.rb +6 -191
  15. data/lib/songtradr_api_client_ruby/api/user_api.rb +161 -749
  16. data/lib/songtradr_api_client_ruby/api_client.rb +38 -36
  17. data/lib/songtradr_api_client_ruby/api_error.rb +2 -2
  18. data/lib/songtradr_api_client_ruby/configuration.rb +2 -2
  19. data/lib/songtradr_api_client_ruby/models/age_range.rb +3 -3
  20. data/lib/songtradr_api_client_ruby/models/beard.rb +3 -3
  21. data/lib/songtradr_api_client_ruby/models/bounding_box.rb +3 -3
  22. data/lib/songtradr_api_client_ruby/models/category_medium_dto.rb +3 -3
  23. data/lib/songtradr_api_client_ruby/models/category_minimal_dto.rb +3 -3
  24. data/lib/songtradr_api_client_ruby/models/config_access_dto.rb +3 -3
  25. data/lib/songtradr_api_client_ruby/models/config_identifier_dto.rb +3 -3
  26. data/lib/songtradr_api_client_ruby/models/contributor_type_dto.rb +3 -3
  27. data/lib/songtradr_api_client_ruby/models/curate_playlist_dto.rb +3 -3
  28. data/lib/songtradr_api_client_ruby/models/curate_playlist_response_dto.rb +3 -3
  29. data/lib/songtradr_api_client_ruby/models/dominant_color.rb +3 -3
  30. data/lib/songtradr_api_client_ruby/models/emotion.rb +3 -3
  31. data/lib/songtradr_api_client_ruby/models/error_response.rb +3 -3
  32. data/lib/songtradr_api_client_ruby/models/eye_direction.rb +3 -3
  33. data/lib/songtradr_api_client_ruby/models/eye_open.rb +3 -3
  34. data/lib/songtradr_api_client_ruby/models/eyeglasses.rb +3 -3
  35. data/lib/songtradr_api_client_ruby/models/face_detail.rb +3 -3
  36. data/lib/songtradr_api_client_ruby/models/face_detection.rb +3 -3
  37. data/lib/songtradr_api_client_ruby/models/face_occluded.rb +3 -3
  38. data/lib/songtradr_api_client_ruby/models/field_summary_dto.rb +3 -3
  39. data/lib/songtradr_api_client_ruby/models/file_dto.rb +3 -3
  40. data/lib/songtradr_api_client_ruby/models/file_list_dto.rb +3 -3
  41. data/lib/songtradr_api_client_ruby/models/file_small_dto.rb +15 -15
  42. data/lib/songtradr_api_client_ruby/models/file_upload_dto.rb +3 -3
  43. data/lib/songtradr_api_client_ruby/models/file_w_ith_url_dto.rb +3 -3
  44. data/lib/songtradr_api_client_ruby/models/files_summary_dto.rb +3 -3
  45. data/lib/songtradr_api_client_ruby/models/forgot_password_dto.rb +3 -3
  46. data/lib/songtradr_api_client_ruby/models/gender.rb +3 -3
  47. data/lib/songtradr_api_client_ruby/models/genre_dto.rb +3 -3
  48. data/lib/songtradr_api_client_ruby/models/genre_minimal_dto.rb +3 -3
  49. data/lib/songtradr_api_client_ruby/models/genres_summary_dto.rb +3 -3
  50. data/lib/songtradr_api_client_ruby/models/image_quality.rb +3 -3
  51. data/lib/songtradr_api_client_ruby/models/image_recognition_response.rb +3 -3
  52. data/lib/songtradr_api_client_ruby/models/init_put_recording_audio_dto.rb +3 -3
  53. data/lib/songtradr_api_client_ruby/models/instance.rb +3 -3
  54. data/lib/songtradr_api_client_ruby/models/jwt_token_dto.rb +3 -3
  55. data/lib/songtradr_api_client_ruby/models/label.rb +3 -3
  56. data/lib/songtradr_api_client_ruby/models/label_alias.rb +3 -3
  57. data/lib/songtradr_api_client_ruby/models/label_category.rb +3 -3
  58. data/lib/songtradr_api_client_ruby/models/label_detection.rb +3 -3
  59. data/lib/songtradr_api_client_ruby/models/landmark.rb +3 -3
  60. data/lib/songtradr_api_client_ruby/models/login_dto.rb +3 -3
  61. data/lib/songtradr_api_client_ruby/models/mouth_open.rb +3 -3
  62. data/lib/songtradr_api_client_ruby/models/musical_features_dto.rb +270 -270
  63. data/lib/songtradr_api_client_ruby/models/mustache.rb +3 -3
  64. data/lib/songtradr_api_client_ruby/models/parent.rb +3 -3
  65. data/lib/songtradr_api_client_ruby/models/party_small_dto.rb +3 -3
  66. data/lib/songtradr_api_client_ruby/models/pose.rb +3 -3
  67. data/lib/songtradr_api_client_ruby/models/recording_for_similarity_search_dto.rb +3 -3
  68. data/lib/songtradr_api_client_ruby/models/recording_genre_prediction_dto.rb +23 -23
  69. data/lib/songtradr_api_client_ruby/models/recording_list_dto.rb +3 -3
  70. data/lib/songtradr_api_client_ruby/models/recording_medium_dto.rb +13 -13
  71. data/lib/songtradr_api_client_ruby/models/recording_minimal_with_musical_features_dto.rb +3 -3
  72. data/lib/songtradr_api_client_ruby/models/recording_minimal_with_taggrams_dto.rb +3 -3
  73. data/lib/songtradr_api_client_ruby/models/recording_minimal_with_tagstrengths_dto.rb +3 -3
  74. data/lib/songtradr_api_client_ruby/models/recording_party_dto.rb +18 -18
  75. data/lib/songtradr_api_client_ruby/models/recording_small_dto.rb +3 -3
  76. data/lib/songtradr_api_client_ruby/models/recording_tag_small_dto.rb +3 -3
  77. data/lib/songtradr_api_client_ruby/models/save_user_dto.rb +3 -3
  78. data/lib/songtradr_api_client_ruby/models/search_filter_values_dto.rb +3 -3
  79. data/lib/songtradr_api_client_ruby/models/search_recording_granular_dto.rb +3 -3
  80. data/lib/songtradr_api_client_ruby/models/sign_up_dto.rb +3 -3
  81. data/lib/songtradr_api_client_ruby/models/smile.rb +3 -3
  82. data/lib/songtradr_api_client_ruby/models/sunglasses.rb +3 -3
  83. data/lib/songtradr_api_client_ruby/models/tag_dto.rb +3 -3
  84. data/lib/songtradr_api_client_ruby/models/tag_small_dto.rb +3 -3
  85. data/lib/songtradr_api_client_ruby/models/taggram_dto.rb +3 -3
  86. data/lib/songtradr_api_client_ruby/models/tags_summary_dto.rb +3 -3
  87. data/lib/songtradr_api_client_ruby/models/tagstrength_dto.rb +3 -3
  88. data/lib/songtradr_api_client_ruby/models/title_dto.rb +3 -3
  89. data/lib/songtradr_api_client_ruby/models/token_request.rb +3 -3
  90. data/lib/songtradr_api_client_ruby/models/track_dto.rb +3 -3
  91. data/lib/songtradr_api_client_ruby/models/update_password_dto.rb +3 -3
  92. data/lib/songtradr_api_client_ruby/models/user_dto.rb +3 -3
  93. data/lib/songtradr_api_client_ruby/models/video_recognition_response.rb +3 -3
  94. data/lib/songtradr_api_client_ruby/version.rb +3 -3
  95. data/lib/songtradr_api_client_ruby.rb +2 -23
  96. data/openapi-generator-config.yaml +1 -1
  97. data/songtradr_api_client_ruby.gemspec +3 -2
  98. data/spec/api/allowed_values_api_spec.rb +2 -2
  99. data/spec/api/playlist_api_spec.rb +2 -39
  100. data/spec/api/recording_api_spec.rb +3 -35
  101. data/spec/api/user_api_spec.rb +6 -111
  102. data/spec/api_client_spec.rb +2 -2
  103. data/spec/configuration_spec.rb +2 -2
  104. data/spec/models/age_range_spec.rb +2 -2
  105. data/spec/models/beard_spec.rb +2 -2
  106. data/spec/models/bounding_box_spec.rb +2 -2
  107. data/spec/models/category_medium_dto_spec.rb +2 -2
  108. data/spec/models/category_minimal_dto_spec.rb +2 -2
  109. data/spec/models/config_access_dto_spec.rb +2 -2
  110. data/spec/models/config_identifier_dto_spec.rb +2 -2
  111. data/spec/models/contributor_type_dto_spec.rb +2 -2
  112. data/spec/models/curate_playlist_dto_spec.rb +2 -2
  113. data/spec/models/curate_playlist_response_dto_spec.rb +2 -2
  114. data/spec/models/dominant_color_spec.rb +2 -2
  115. data/spec/models/emotion_spec.rb +2 -2
  116. data/spec/models/error_response_spec.rb +2 -2
  117. data/spec/models/eye_direction_spec.rb +2 -2
  118. data/spec/models/eye_open_spec.rb +2 -2
  119. data/spec/models/eyeglasses_spec.rb +2 -2
  120. data/spec/models/face_detail_spec.rb +2 -2
  121. data/spec/models/face_detection_spec.rb +2 -2
  122. data/spec/models/face_occluded_spec.rb +2 -2
  123. data/spec/models/field_summary_dto_spec.rb +2 -2
  124. data/spec/models/file_dto_spec.rb +2 -2
  125. data/spec/models/file_list_dto_spec.rb +2 -2
  126. data/spec/models/file_small_dto_spec.rb +5 -5
  127. data/spec/models/file_upload_dto_spec.rb +2 -2
  128. data/spec/models/file_w_ith_url_dto_spec.rb +2 -2
  129. data/spec/models/files_summary_dto_spec.rb +2 -2
  130. data/spec/models/forgot_password_dto_spec.rb +2 -2
  131. data/spec/models/gender_spec.rb +2 -2
  132. data/spec/models/genre_dto_spec.rb +2 -2
  133. data/spec/models/genre_minimal_dto_spec.rb +2 -2
  134. data/spec/models/genres_summary_dto_spec.rb +2 -2
  135. data/spec/models/image_quality_spec.rb +2 -2
  136. data/spec/models/image_recognition_response_spec.rb +2 -2
  137. data/spec/models/init_put_recording_audio_dto_spec.rb +2 -2
  138. data/spec/models/instance_spec.rb +2 -2
  139. data/spec/models/jwt_token_dto_spec.rb +2 -2
  140. data/spec/models/label_alias_spec.rb +2 -2
  141. data/spec/models/label_category_spec.rb +2 -2
  142. data/spec/models/label_detection_spec.rb +2 -2
  143. data/spec/models/label_spec.rb +2 -2
  144. data/spec/models/landmark_spec.rb +2 -2
  145. data/spec/models/login_dto_spec.rb +2 -2
  146. data/spec/models/mouth_open_spec.rb +2 -2
  147. data/spec/models/musical_features_dto_spec.rb +81 -81
  148. data/spec/models/mustache_spec.rb +2 -2
  149. data/spec/models/parent_spec.rb +2 -2
  150. data/spec/models/party_small_dto_spec.rb +2 -2
  151. data/spec/models/pose_spec.rb +2 -2
  152. data/spec/models/recording_for_similarity_search_dto_spec.rb +2 -2
  153. data/spec/models/recording_genre_prediction_dto_spec.rb +5 -5
  154. data/spec/models/recording_list_dto_spec.rb +2 -2
  155. data/spec/models/recording_medium_dto_spec.rb +4 -4
  156. data/spec/models/recording_minimal_with_musical_features_dto_spec.rb +2 -2
  157. data/spec/models/recording_minimal_with_taggrams_dto_spec.rb +2 -2
  158. data/spec/models/recording_minimal_with_tagstrengths_dto_spec.rb +2 -2
  159. data/spec/models/recording_party_dto_spec.rb +4 -4
  160. data/spec/models/recording_small_dto_spec.rb +2 -2
  161. data/spec/models/recording_tag_small_dto_spec.rb +2 -2
  162. data/spec/models/save_user_dto_spec.rb +2 -2
  163. data/spec/models/search_filter_values_dto_spec.rb +2 -2
  164. data/spec/models/search_recording_granular_dto_spec.rb +2 -2
  165. data/spec/models/sign_up_dto_spec.rb +2 -2
  166. data/spec/models/smile_spec.rb +2 -2
  167. data/spec/models/sunglasses_spec.rb +2 -2
  168. data/spec/models/tag_dto_spec.rb +2 -2
  169. data/spec/models/tag_small_dto_spec.rb +2 -2
  170. data/spec/models/taggram_dto_spec.rb +2 -2
  171. data/spec/models/tags_summary_dto_spec.rb +2 -2
  172. data/spec/models/tagstrength_dto_spec.rb +2 -2
  173. data/spec/models/title_dto_spec.rb +2 -2
  174. data/spec/models/token_request_spec.rb +2 -2
  175. data/spec/models/track_dto_spec.rb +2 -2
  176. data/spec/models/update_password_dto_spec.rb +2 -2
  177. data/spec/models/user_dto_spec.rb +2 -2
  178. data/spec/models/video_recognition_response_spec.rb +2 -2
  179. data/spec/spec_helper.rb +2 -2
  180. metadata +65 -149
  181. data/docs/ContextValue.md +0 -18
  182. data/docs/FileMinimalWithUrlDTO.md +0 -22
  183. data/docs/PLineDTO.md +0 -20
  184. data/docs/PartyApi.md +0 -75
  185. data/docs/PartyLargeDTO.md +0 -32
  186. data/docs/PlaylistLargeDTO.md +0 -38
  187. data/docs/ProductMediumDTO.md +0 -34
  188. data/docs/ProductPartyDTO.md +0 -20
  189. data/docs/RecordingLargeDTO.md +0 -40
  190. data/docs/RecordingPlaylistDTO.md +0 -24
  191. data/docs/SaveFileRecordingDTO.md +0 -240
  192. data/docs/SavePlaylistDTO.md +0 -34
  193. data/docs/SaveRecordingGenreDTO.md +0 -22
  194. data/docs/SaveRecordingPartyDTO.md +0 -20
  195. data/docs/SaveRecordingPlaylistDTO.md +0 -22
  196. data/docs/SaveRecordingTagDTO.md +0 -20
  197. data/docs/SaveReferrerDTO.md +0 -20
  198. data/docs/SaveTaggramsDTO.md +0 -82
  199. data/docs/SearchRecordingGranularAbstractionDTO.md +0 -20
  200. data/docs/TrackToMediumProductDTO.md +0 -22
  201. data/docs/UsageDTO.md +0 -18
  202. data/lib/songtradr_api_client_ruby/api/party_api.rb +0 -84
  203. data/lib/songtradr_api_client_ruby/models/context_value.rb +0 -216
  204. data/lib/songtradr_api_client_ruby/models/file_minimal_with_url_dto.rb +0 -254
  205. data/lib/songtradr_api_client_ruby/models/p_line_dto.rb +0 -231
  206. data/lib/songtradr_api_client_ruby/models/party_large_dto.rb +0 -285
  207. data/lib/songtradr_api_client_ruby/models/playlist_large_dto.rb +0 -350
  208. data/lib/songtradr_api_client_ruby/models/product_medium_dto.rb +0 -323
  209. data/lib/songtradr_api_client_ruby/models/product_party_dto.rb +0 -233
  210. data/lib/songtradr_api_client_ruby/models/recording_large_dto.rb +0 -383
  211. data/lib/songtradr_api_client_ruby/models/recording_playlist_dto.rb +0 -242
  212. data/lib/songtradr_api_client_ruby/models/save_file_recording_dto.rb +0 -1864
  213. data/lib/songtradr_api_client_ruby/models/save_playlist_dto.rb +0 -353
  214. data/lib/songtradr_api_client_ruby/models/save_recording_genre_dto.rb +0 -240
  215. data/lib/songtradr_api_client_ruby/models/save_recording_party_dto.rb +0 -272
  216. data/lib/songtradr_api_client_ruby/models/save_recording_playlist_dto.rb +0 -247
  217. data/lib/songtradr_api_client_ruby/models/save_recording_tag_dto.rb +0 -231
  218. data/lib/songtradr_api_client_ruby/models/save_referrer_dto.rb +0 -224
  219. data/lib/songtradr_api_client_ruby/models/save_taggrams_dto.rb +0 -569
  220. data/lib/songtradr_api_client_ruby/models/search_recording_granular_abstraction_dto.rb +0 -267
  221. data/lib/songtradr_api_client_ruby/models/track_to_medium_product_dto.rb +0 -247
  222. data/lib/songtradr_api_client_ruby/models/usage_dto.rb +0 -215
  223. data/spec/api/party_api_spec.rb +0 -46
  224. data/spec/models/context_value_spec.rb +0 -36
  225. data/spec/models/file_minimal_with_url_dto_spec.rb +0 -48
  226. data/spec/models/p_line_dto_spec.rb +0 -42
  227. data/spec/models/party_large_dto_spec.rb +0 -78
  228. data/spec/models/playlist_large_dto_spec.rb +0 -100
  229. data/spec/models/product_medium_dto_spec.rb +0 -84
  230. data/spec/models/product_party_dto_spec.rb +0 -42
  231. data/spec/models/recording_large_dto_spec.rb +0 -102
  232. data/spec/models/recording_playlist_dto_spec.rb +0 -54
  233. data/spec/models/save_file_recording_dto_spec.rb +0 -894
  234. data/spec/models/save_playlist_dto_spec.rb +0 -88
  235. data/spec/models/save_recording_genre_dto_spec.rb +0 -48
  236. data/spec/models/save_recording_party_dto_spec.rb +0 -46
  237. data/spec/models/save_recording_playlist_dto_spec.rb +0 -48
  238. data/spec/models/save_recording_tag_dto_spec.rb +0 -42
  239. data/spec/models/save_referrer_dto_spec.rb +0 -42
  240. data/spec/models/save_taggrams_dto_spec.rb +0 -228
  241. data/spec/models/search_recording_granular_abstraction_dto_spec.rb +0 -46
  242. data/spec/models/track_to_medium_product_dto_spec.rb +0 -48
  243. data/spec/models/usage_dto_spec.rb +0 -36
@@ -1,383 +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.13.7
7
- Contact: info@songtradr.com
8
- Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 7.1.0-SNAPSHOT
10
-
11
- =end
12
-
13
- require 'date'
14
- require 'time'
15
-
16
- module SongtradrApiClientRuby
17
- # Recording with a large field set.
18
- class RecordingLargeDTO
19
- attr_accessor :duration
20
-
21
- attr_accessor :isrc
22
-
23
- attr_accessor :parties
24
-
25
- attr_accessor :genres
26
-
27
- attr_accessor :language_of_performance
28
-
29
- attr_accessor :titles
30
-
31
- attr_accessor :tracks
32
-
33
- attr_accessor :musical_features
34
-
35
- attr_accessor :tags
36
-
37
- attr_accessor :spotify_id
38
-
39
- attr_accessor :genre_predictions
40
-
41
- attr_accessor :pline
42
-
43
- # Attribute mapping from ruby-style variable name to JSON key.
44
- def self.attribute_map
45
- {
46
- :'duration' => :'duration',
47
- :'isrc' => :'isrc',
48
- :'parties' => :'parties',
49
- :'genres' => :'genres',
50
- :'language_of_performance' => :'languageOfPerformance',
51
- :'titles' => :'titles',
52
- :'tracks' => :'tracks',
53
- :'musical_features' => :'musicalFeatures',
54
- :'tags' => :'tags',
55
- :'spotify_id' => :'spotifyId',
56
- :'genre_predictions' => :'genrePredictions',
57
- :'pline' => :'pline'
58
- }
59
- end
60
-
61
- # Returns all the JSON keys this model knows about
62
- def self.acceptable_attributes
63
- attribute_map.values
64
- end
65
-
66
- # Attribute type mapping.
67
- def self.openapi_types
68
- {
69
- :'duration' => :'Integer',
70
- :'isrc' => :'String',
71
- :'parties' => :'Array<RecordingPartyDTO>',
72
- :'genres' => :'Array<GenreDTO>',
73
- :'language_of_performance' => :'String',
74
- :'titles' => :'Array<TitleDTO>',
75
- :'tracks' => :'Array<TrackToMediumProductDTO>',
76
- :'musical_features' => :'MusicalFeaturesDTO',
77
- :'tags' => :'Array<RecordingTagSmallDTO>',
78
- :'spotify_id' => :'String',
79
- :'genre_predictions' => :'Array<RecordingGenrePredictionDTO>',
80
- :'pline' => :'PLineDTO'
81
- }
82
- end
83
-
84
- # List of attributes with nullable: true
85
- def self.openapi_nullable
86
- Set.new([
87
- ])
88
- end
89
-
90
- # Initializes the object
91
- # @param [Hash] attributes Model attributes in the form of hash
92
- def initialize(attributes = {})
93
- if (!attributes.is_a?(Hash))
94
- fail ArgumentError, "The input argument (attributes) must be a hash in `SongtradrApiClientRuby::RecordingLargeDTO` initialize method"
95
- end
96
-
97
- # check to see if the attribute exists and convert string to symbol for hash key
98
- attributes = attributes.each_with_object({}) { |(k, v), h|
99
- if (!self.class.attribute_map.key?(k.to_sym))
100
- fail ArgumentError, "`#{k}` is not a valid attribute in `SongtradrApiClientRuby::RecordingLargeDTO`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
101
- end
102
- h[k.to_sym] = v
103
- }
104
-
105
- if attributes.key?(:'duration')
106
- self.duration = attributes[:'duration']
107
- end
108
-
109
- if attributes.key?(:'isrc')
110
- self.isrc = attributes[:'isrc']
111
- else
112
- self.isrc = nil
113
- end
114
-
115
- if attributes.key?(:'parties')
116
- if (value = attributes[:'parties']).is_a?(Array)
117
- self.parties = value
118
- end
119
- end
120
-
121
- if attributes.key?(:'genres')
122
- if (value = attributes[:'genres']).is_a?(Array)
123
- self.genres = value
124
- end
125
- end
126
-
127
- if attributes.key?(:'language_of_performance')
128
- self.language_of_performance = attributes[:'language_of_performance']
129
- end
130
-
131
- if attributes.key?(:'titles')
132
- if (value = attributes[:'titles']).is_a?(Array)
133
- self.titles = value
134
- end
135
- end
136
-
137
- if attributes.key?(:'tracks')
138
- if (value = attributes[:'tracks']).is_a?(Array)
139
- self.tracks = value
140
- end
141
- end
142
-
143
- if attributes.key?(:'musical_features')
144
- self.musical_features = attributes[:'musical_features']
145
- end
146
-
147
- if attributes.key?(:'tags')
148
- if (value = attributes[:'tags']).is_a?(Array)
149
- self.tags = value
150
- end
151
- end
152
-
153
- if attributes.key?(:'spotify_id')
154
- self.spotify_id = attributes[:'spotify_id']
155
- end
156
-
157
- if attributes.key?(:'genre_predictions')
158
- if (value = attributes[:'genre_predictions']).is_a?(Array)
159
- self.genre_predictions = value
160
- end
161
- end
162
-
163
- if attributes.key?(:'pline')
164
- self.pline = attributes[:'pline']
165
- end
166
- end
167
-
168
- # Show invalid properties with the reasons. Usually used together with valid?
169
- # @return Array for valid properties with the reasons
170
- def list_invalid_properties
171
- warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
172
- invalid_properties = Array.new
173
- if @isrc.nil?
174
- invalid_properties.push('invalid value for "isrc", isrc cannot be nil.')
175
- end
176
-
177
- invalid_properties
178
- end
179
-
180
- # Check to see if the all the properties in the model are valid
181
- # @return true if the model is valid
182
- def valid?
183
- warn '[DEPRECATED] the `valid?` method is obsolete'
184
- return false if @isrc.nil?
185
- true
186
- end
187
-
188
- # Custom attribute writer method with validation
189
- # @param [Object] parties Value to be assigned
190
- def parties=(parties)
191
- if parties.nil?
192
- fail ArgumentError, 'parties cannot be nil'
193
- end
194
-
195
- @parties = parties
196
- end
197
-
198
- # Custom attribute writer method with validation
199
- # @param [Object] genres Value to be assigned
200
- def genres=(genres)
201
- if genres.nil?
202
- fail ArgumentError, 'genres cannot be nil'
203
- end
204
-
205
- @genres = genres
206
- end
207
-
208
- # Custom attribute writer method with validation
209
- # @param [Object] titles Value to be assigned
210
- def titles=(titles)
211
- if titles.nil?
212
- fail ArgumentError, 'titles cannot be nil'
213
- end
214
-
215
- @titles = titles
216
- end
217
-
218
- # Custom attribute writer method with validation
219
- # @param [Object] tracks Value to be assigned
220
- def tracks=(tracks)
221
- if tracks.nil?
222
- fail ArgumentError, 'tracks cannot be nil'
223
- end
224
-
225
- @tracks = tracks
226
- end
227
-
228
- # Custom attribute writer method with validation
229
- # @param [Object] genre_predictions Value to be assigned
230
- def genre_predictions=(genre_predictions)
231
- if genre_predictions.nil?
232
- fail ArgumentError, 'genre_predictions cannot be nil'
233
- end
234
-
235
- @genre_predictions = genre_predictions
236
- end
237
-
238
- # Checks equality by comparing each attribute.
239
- # @param [Object] Object to be compared
240
- def ==(o)
241
- return true if self.equal?(o)
242
- self.class == o.class &&
243
- duration == o.duration &&
244
- isrc == o.isrc &&
245
- parties == o.parties &&
246
- genres == o.genres &&
247
- language_of_performance == o.language_of_performance &&
248
- titles == o.titles &&
249
- tracks == o.tracks &&
250
- musical_features == o.musical_features &&
251
- tags == o.tags &&
252
- spotify_id == o.spotify_id &&
253
- genre_predictions == o.genre_predictions &&
254
- pline == o.pline
255
- end
256
-
257
- # @see the `==` method
258
- # @param [Object] Object to be compared
259
- def eql?(o)
260
- self == o
261
- end
262
-
263
- # Calculates hash code according to all attributes.
264
- # @return [Integer] Hash code
265
- def hash
266
- [duration, isrc, parties, genres, language_of_performance, titles, tracks, musical_features, tags, spotify_id, genre_predictions, pline].hash
267
- end
268
-
269
- # Builds the object from hash
270
- # @param [Hash] attributes Model attributes in the form of hash
271
- # @return [Object] Returns the model itself
272
- def self.build_from_hash(attributes)
273
- return nil unless attributes.is_a?(Hash)
274
- attributes = attributes.transform_keys(&:to_sym)
275
- transformed_hash = {}
276
- openapi_types.each_pair do |key, type|
277
- if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
278
- transformed_hash["#{key}"] = nil
279
- elsif type =~ /\AArray<(.*)>/i
280
- # check to ensure the input is an array given that the attribute
281
- # is documented as an array but the input is not
282
- if attributes[attribute_map[key]].is_a?(Array)
283
- transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
284
- end
285
- elsif !attributes[attribute_map[key]].nil?
286
- transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
287
- end
288
- end
289
- new(transformed_hash)
290
- end
291
-
292
- # Deserializes the data based on type
293
- # @param string type Data type
294
- # @param string value Value to be deserialized
295
- # @return [Object] Deserialized data
296
- def self._deserialize(type, value)
297
- case type.to_sym
298
- when :Time
299
- Time.parse(value)
300
- when :Date
301
- Date.parse(value)
302
- when :String
303
- value.to_s
304
- when :Integer
305
- value.to_i
306
- when :Float
307
- value.to_f
308
- when :Boolean
309
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
310
- true
311
- else
312
- false
313
- end
314
- when :Object
315
- # generic object (usually a Hash), return directly
316
- value
317
- when /\AArray<(?<inner_type>.+)>\z/
318
- inner_type = Regexp.last_match[:inner_type]
319
- value.map { |v| _deserialize(inner_type, v) }
320
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
321
- k_type = Regexp.last_match[:k_type]
322
- v_type = Regexp.last_match[:v_type]
323
- {}.tap do |hash|
324
- value.each do |k, v|
325
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
326
- end
327
- end
328
- else # model
329
- # models (e.g. Pet) or oneOf
330
- klass = SongtradrApiClientRuby.const_get(type)
331
- klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
332
- end
333
- end
334
-
335
- # Returns the string representation of the object
336
- # @return [String] String presentation of the object
337
- def to_s
338
- to_hash.to_s
339
- end
340
-
341
- # to_body is an alias to to_hash (backward compatibility)
342
- # @return [Hash] Returns the object in the form of hash
343
- def to_body
344
- to_hash
345
- end
346
-
347
- # Returns the object in the form of hash
348
- # @return [Hash] Returns the object in the form of hash
349
- def to_hash
350
- hash = {}
351
- self.class.attribute_map.each_pair do |attr, param|
352
- value = self.send(attr)
353
- if value.nil?
354
- is_nullable = self.class.openapi_nullable.include?(attr)
355
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
356
- end
357
-
358
- hash[param] = _to_hash(value)
359
- end
360
- hash
361
- end
362
-
363
- # Outputs non-array value in the form of hash
364
- # For object, use to_hash. Otherwise, just return the value
365
- # @param [Object] value Any valid value
366
- # @return [Hash] Returns the value in the form of hash
367
- def _to_hash(value)
368
- if value.is_a?(Array)
369
- value.compact.map { |v| _to_hash(v) }
370
- elsif value.is_a?(Hash)
371
- {}.tap do |hash|
372
- value.each { |k, v| hash[k] = _to_hash(v) }
373
- end
374
- elsif value.respond_to? :to_hash
375
- value.to_hash
376
- else
377
- value
378
- end
379
- end
380
-
381
- end
382
-
383
- end
@@ -1,242 +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.13.7
7
- Contact: info@songtradr.com
8
- Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 7.1.0-SNAPSHOT
10
-
11
- =end
12
-
13
- require 'date'
14
- require 'time'
15
-
16
- module SongtradrApiClientRuby
17
- # Recording Playlist connection
18
- class RecordingPlaylistDTO
19
- attr_accessor :recording
20
-
21
- attr_accessor :songtradr_track_guid
22
-
23
- attr_accessor :assigned_by_id
24
-
25
- attr_accessor :sequence
26
-
27
- # Attribute mapping from ruby-style variable name to JSON key.
28
- def self.attribute_map
29
- {
30
- :'recording' => :'recording',
31
- :'songtradr_track_guid' => :'songtradrTrackGuid',
32
- :'assigned_by_id' => :'assignedById',
33
- :'sequence' => :'sequence'
34
- }
35
- end
36
-
37
- # Returns all the JSON keys this model knows about
38
- def self.acceptable_attributes
39
- attribute_map.values
40
- end
41
-
42
- # Attribute type mapping.
43
- def self.openapi_types
44
- {
45
- :'recording' => :'RecordingMediumDTO',
46
- :'songtradr_track_guid' => :'String',
47
- :'assigned_by_id' => :'Integer',
48
- :'sequence' => :'Integer'
49
- }
50
- end
51
-
52
- # List of attributes with nullable: true
53
- def self.openapi_nullable
54
- Set.new([
55
- ])
56
- end
57
-
58
- # Initializes the object
59
- # @param [Hash] attributes Model attributes in the form of hash
60
- def initialize(attributes = {})
61
- if (!attributes.is_a?(Hash))
62
- fail ArgumentError, "The input argument (attributes) must be a hash in `SongtradrApiClientRuby::RecordingPlaylistDTO` initialize method"
63
- end
64
-
65
- # check to see if the attribute exists and convert string to symbol for hash key
66
- attributes = attributes.each_with_object({}) { |(k, v), h|
67
- if (!self.class.attribute_map.key?(k.to_sym))
68
- fail ArgumentError, "`#{k}` is not a valid attribute in `SongtradrApiClientRuby::RecordingPlaylistDTO`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
69
- end
70
- h[k.to_sym] = v
71
- }
72
-
73
- if attributes.key?(:'recording')
74
- self.recording = attributes[:'recording']
75
- end
76
-
77
- if attributes.key?(:'songtradr_track_guid')
78
- self.songtradr_track_guid = attributes[:'songtradr_track_guid']
79
- end
80
-
81
- if attributes.key?(:'assigned_by_id')
82
- self.assigned_by_id = attributes[:'assigned_by_id']
83
- end
84
-
85
- if attributes.key?(:'sequence')
86
- self.sequence = attributes[:'sequence']
87
- end
88
- end
89
-
90
- # Show invalid properties with the reasons. Usually used together with valid?
91
- # @return Array for valid properties with the reasons
92
- def list_invalid_properties
93
- warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
94
- invalid_properties = Array.new
95
- invalid_properties
96
- end
97
-
98
- # Check to see if the all the properties in the model are valid
99
- # @return true if the model is valid
100
- def valid?
101
- warn '[DEPRECATED] the `valid?` method is obsolete'
102
- true
103
- end
104
-
105
- # Checks equality by comparing each attribute.
106
- # @param [Object] Object to be compared
107
- def ==(o)
108
- return true if self.equal?(o)
109
- self.class == o.class &&
110
- recording == o.recording &&
111
- songtradr_track_guid == o.songtradr_track_guid &&
112
- assigned_by_id == o.assigned_by_id &&
113
- sequence == o.sequence
114
- end
115
-
116
- # @see the `==` method
117
- # @param [Object] Object to be compared
118
- def eql?(o)
119
- self == o
120
- end
121
-
122
- # Calculates hash code according to all attributes.
123
- # @return [Integer] Hash code
124
- def hash
125
- [recording, songtradr_track_guid, assigned_by_id, sequence].hash
126
- end
127
-
128
- # Builds the object from hash
129
- # @param [Hash] attributes Model attributes in the form of hash
130
- # @return [Object] Returns the model itself
131
- def self.build_from_hash(attributes)
132
- return nil unless attributes.is_a?(Hash)
133
- attributes = attributes.transform_keys(&:to_sym)
134
- transformed_hash = {}
135
- openapi_types.each_pair do |key, type|
136
- if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
137
- transformed_hash["#{key}"] = nil
138
- elsif type =~ /\AArray<(.*)>/i
139
- # check to ensure the input is an array given that the attribute
140
- # is documented as an array but the input is not
141
- if attributes[attribute_map[key]].is_a?(Array)
142
- transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
143
- end
144
- elsif !attributes[attribute_map[key]].nil?
145
- transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
146
- end
147
- end
148
- new(transformed_hash)
149
- end
150
-
151
- # Deserializes the data based on type
152
- # @param string type Data type
153
- # @param string value Value to be deserialized
154
- # @return [Object] Deserialized data
155
- def self._deserialize(type, value)
156
- case type.to_sym
157
- when :Time
158
- Time.parse(value)
159
- when :Date
160
- Date.parse(value)
161
- when :String
162
- value.to_s
163
- when :Integer
164
- value.to_i
165
- when :Float
166
- value.to_f
167
- when :Boolean
168
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
169
- true
170
- else
171
- false
172
- end
173
- when :Object
174
- # generic object (usually a Hash), return directly
175
- value
176
- when /\AArray<(?<inner_type>.+)>\z/
177
- inner_type = Regexp.last_match[:inner_type]
178
- value.map { |v| _deserialize(inner_type, v) }
179
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
180
- k_type = Regexp.last_match[:k_type]
181
- v_type = Regexp.last_match[:v_type]
182
- {}.tap do |hash|
183
- value.each do |k, v|
184
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
185
- end
186
- end
187
- else # model
188
- # models (e.g. Pet) or oneOf
189
- klass = SongtradrApiClientRuby.const_get(type)
190
- klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
191
- end
192
- end
193
-
194
- # Returns the string representation of the object
195
- # @return [String] String presentation of the object
196
- def to_s
197
- to_hash.to_s
198
- end
199
-
200
- # to_body is an alias to to_hash (backward compatibility)
201
- # @return [Hash] Returns the object in the form of hash
202
- def to_body
203
- to_hash
204
- end
205
-
206
- # Returns the object in the form of hash
207
- # @return [Hash] Returns the object in the form of hash
208
- def to_hash
209
- hash = {}
210
- self.class.attribute_map.each_pair do |attr, param|
211
- value = self.send(attr)
212
- if value.nil?
213
- is_nullable = self.class.openapi_nullable.include?(attr)
214
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
215
- end
216
-
217
- hash[param] = _to_hash(value)
218
- end
219
- hash
220
- end
221
-
222
- # Outputs non-array value in the form of hash
223
- # For object, use to_hash. Otherwise, just return the value
224
- # @param [Object] value Any valid value
225
- # @return [Hash] Returns the value in the form of hash
226
- def _to_hash(value)
227
- if value.is_a?(Array)
228
- value.compact.map { |v| _to_hash(v) }
229
- elsif value.is_a?(Hash)
230
- {}.tap do |hash|
231
- value.each { |k, v| hash[k] = _to_hash(v) }
232
- end
233
- elsif value.respond_to? :to_hash
234
- value.to_hash
235
- else
236
- value
237
- end
238
- end
239
-
240
- end
241
-
242
- end