songtradr_api_client_ruby 1.13.6 → 1.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (243) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +1 -1
  3. data/README.md +5 -37
  4. data/docs/FileSmallDTO.md +5 -5
  5. data/docs/MusicalFeaturesDTO.md +47 -47
  6. data/docs/PlaylistApi.md +1 -215
  7. data/docs/RecordingApi.md +10 -208
  8. data/docs/RecordingMediumDTO.md +2 -2
  9. data/docs/RecordingSmallDTO.md +3 -1
  10. data/docs/TagDTO.md +3 -3
  11. data/docs/UserApi.md +0 -456
  12. data/lib/songtradr_api_client_ruby/api/allowed_values_api.rb +1 -1
  13. data/lib/songtradr_api_client_ruby/api/playlist_api.rb +2 -202
  14. data/lib/songtradr_api_client_ruby/api/recording_api.rb +7 -189
  15. data/lib/songtradr_api_client_ruby/api/user_api.rb +134 -746
  16. data/lib/songtradr_api_client_ruby/api_client.rb +37 -35
  17. data/lib/songtradr_api_client_ruby/api_error.rb +1 -1
  18. data/lib/songtradr_api_client_ruby/configuration.rb +1 -1
  19. data/lib/songtradr_api_client_ruby/models/age_range.rb +2 -2
  20. data/lib/songtradr_api_client_ruby/models/beard.rb +2 -2
  21. data/lib/songtradr_api_client_ruby/models/bounding_box.rb +2 -2
  22. data/lib/songtradr_api_client_ruby/models/category_medium_dto.rb +2 -2
  23. data/lib/songtradr_api_client_ruby/models/category_minimal_dto.rb +2 -2
  24. data/lib/songtradr_api_client_ruby/models/config_access_dto.rb +2 -2
  25. data/lib/songtradr_api_client_ruby/models/config_identifier_dto.rb +2 -2
  26. data/lib/songtradr_api_client_ruby/models/contributor_type_dto.rb +2 -2
  27. data/lib/songtradr_api_client_ruby/models/curate_playlist_dto.rb +2 -2
  28. data/lib/songtradr_api_client_ruby/models/curate_playlist_response_dto.rb +2 -2
  29. data/lib/songtradr_api_client_ruby/models/dominant_color.rb +2 -2
  30. data/lib/songtradr_api_client_ruby/models/emotion.rb +2 -2
  31. data/lib/songtradr_api_client_ruby/models/error_response.rb +2 -2
  32. data/lib/songtradr_api_client_ruby/models/eye_direction.rb +2 -2
  33. data/lib/songtradr_api_client_ruby/models/eye_open.rb +2 -2
  34. data/lib/songtradr_api_client_ruby/models/eyeglasses.rb +2 -2
  35. data/lib/songtradr_api_client_ruby/models/face_detail.rb +2 -2
  36. data/lib/songtradr_api_client_ruby/models/face_detection.rb +2 -2
  37. data/lib/songtradr_api_client_ruby/models/face_occluded.rb +2 -2
  38. data/lib/songtradr_api_client_ruby/models/field_summary_dto.rb +2 -2
  39. data/lib/songtradr_api_client_ruby/models/file_dto.rb +2 -2
  40. data/lib/songtradr_api_client_ruby/models/file_list_dto.rb +2 -2
  41. data/lib/songtradr_api_client_ruby/models/file_small_dto.rb +37 -37
  42. data/lib/songtradr_api_client_ruby/models/file_upload_dto.rb +2 -2
  43. data/lib/songtradr_api_client_ruby/models/file_w_ith_url_dto.rb +2 -2
  44. data/lib/songtradr_api_client_ruby/models/files_summary_dto.rb +2 -2
  45. data/lib/songtradr_api_client_ruby/models/forgot_password_dto.rb +2 -2
  46. data/lib/songtradr_api_client_ruby/models/gender.rb +2 -2
  47. data/lib/songtradr_api_client_ruby/models/genre_dto.rb +2 -2
  48. data/lib/songtradr_api_client_ruby/models/genre_minimal_dto.rb +2 -2
  49. data/lib/songtradr_api_client_ruby/models/genres_summary_dto.rb +2 -2
  50. data/lib/songtradr_api_client_ruby/models/image_quality.rb +2 -2
  51. data/lib/songtradr_api_client_ruby/models/image_recognition_response.rb +2 -2
  52. data/lib/songtradr_api_client_ruby/models/init_put_recording_audio_dto.rb +2 -2
  53. data/lib/songtradr_api_client_ruby/models/instance.rb +2 -2
  54. data/lib/songtradr_api_client_ruby/models/jwt_token_dto.rb +2 -2
  55. data/lib/songtradr_api_client_ruby/models/label.rb +2 -2
  56. data/lib/songtradr_api_client_ruby/models/label_alias.rb +2 -2
  57. data/lib/songtradr_api_client_ruby/models/label_category.rb +2 -2
  58. data/lib/songtradr_api_client_ruby/models/label_detection.rb +2 -2
  59. data/lib/songtradr_api_client_ruby/models/landmark.rb +2 -2
  60. data/lib/songtradr_api_client_ruby/models/login_dto.rb +2 -2
  61. data/lib/songtradr_api_client_ruby/models/mouth_open.rb +2 -2
  62. data/lib/songtradr_api_client_ruby/models/musical_features_dto.rb +368 -368
  63. data/lib/songtradr_api_client_ruby/models/mustache.rb +2 -2
  64. data/lib/songtradr_api_client_ruby/models/parent.rb +2 -2
  65. data/lib/songtradr_api_client_ruby/models/party_small_dto.rb +2 -2
  66. data/lib/songtradr_api_client_ruby/models/pose.rb +2 -2
  67. data/lib/songtradr_api_client_ruby/models/recording_for_similarity_search_dto.rb +2 -2
  68. data/lib/songtradr_api_client_ruby/models/recording_genre_prediction_dto.rb +2 -2
  69. data/lib/songtradr_api_client_ruby/models/recording_list_dto.rb +2 -2
  70. data/lib/songtradr_api_client_ruby/models/recording_medium_dto.rb +12 -12
  71. data/lib/songtradr_api_client_ruby/models/recording_minimal_with_musical_features_dto.rb +2 -2
  72. data/lib/songtradr_api_client_ruby/models/recording_minimal_with_taggrams_dto.rb +2 -2
  73. data/lib/songtradr_api_client_ruby/models/recording_minimal_with_tagstrengths_dto.rb +2 -2
  74. data/lib/songtradr_api_client_ruby/models/recording_party_dto.rb +2 -2
  75. data/lib/songtradr_api_client_ruby/models/recording_small_dto.rb +17 -6
  76. data/lib/songtradr_api_client_ruby/models/recording_tag_small_dto.rb +2 -2
  77. data/lib/songtradr_api_client_ruby/models/save_user_dto.rb +2 -2
  78. data/lib/songtradr_api_client_ruby/models/search_filter_values_dto.rb +2 -2
  79. data/lib/songtradr_api_client_ruby/models/search_recording_granular_dto.rb +2 -2
  80. data/lib/songtradr_api_client_ruby/models/sign_up_dto.rb +2 -2
  81. data/lib/songtradr_api_client_ruby/models/smile.rb +2 -2
  82. data/lib/songtradr_api_client_ruby/models/sunglasses.rb +2 -2
  83. data/lib/songtradr_api_client_ruby/models/tag_dto.rb +17 -17
  84. data/lib/songtradr_api_client_ruby/models/tag_small_dto.rb +2 -2
  85. data/lib/songtradr_api_client_ruby/models/taggram_dto.rb +2 -2
  86. data/lib/songtradr_api_client_ruby/models/tags_summary_dto.rb +2 -2
  87. data/lib/songtradr_api_client_ruby/models/tagstrength_dto.rb +2 -2
  88. data/lib/songtradr_api_client_ruby/models/title_dto.rb +2 -2
  89. data/lib/songtradr_api_client_ruby/models/token_request.rb +2 -2
  90. data/lib/songtradr_api_client_ruby/models/track_dto.rb +2 -2
  91. data/lib/songtradr_api_client_ruby/models/update_password_dto.rb +2 -2
  92. data/lib/songtradr_api_client_ruby/models/user_dto.rb +2 -2
  93. data/lib/songtradr_api_client_ruby/models/video_recognition_response.rb +2 -2
  94. data/lib/songtradr_api_client_ruby/version.rb +2 -2
  95. data/lib/songtradr_api_client_ruby.rb +1 -22
  96. data/openapi-generator-config.yaml +1 -1
  97. data/songtradr_api_client_ruby.gemspec +2 -1
  98. data/spec/api/allowed_values_api_spec.rb +1 -1
  99. data/spec/api/playlist_api_spec.rb +1 -38
  100. data/spec/api/recording_api_spec.rb +3 -34
  101. data/spec/api/user_api_spec.rb +1 -110
  102. data/spec/api_client_spec.rb +1 -1
  103. data/spec/configuration_spec.rb +1 -1
  104. data/spec/models/age_range_spec.rb +1 -1
  105. data/spec/models/beard_spec.rb +1 -1
  106. data/spec/models/bounding_box_spec.rb +1 -1
  107. data/spec/models/category_medium_dto_spec.rb +1 -1
  108. data/spec/models/category_minimal_dto_spec.rb +1 -1
  109. data/spec/models/config_access_dto_spec.rb +1 -1
  110. data/spec/models/config_identifier_dto_spec.rb +1 -1
  111. data/spec/models/contributor_type_dto_spec.rb +1 -1
  112. data/spec/models/curate_playlist_dto_spec.rb +1 -1
  113. data/spec/models/curate_playlist_response_dto_spec.rb +1 -1
  114. data/spec/models/dominant_color_spec.rb +1 -1
  115. data/spec/models/emotion_spec.rb +1 -1
  116. data/spec/models/error_response_spec.rb +1 -1
  117. data/spec/models/eye_direction_spec.rb +1 -1
  118. data/spec/models/eye_open_spec.rb +1 -1
  119. data/spec/models/eyeglasses_spec.rb +1 -1
  120. data/spec/models/face_detail_spec.rb +1 -1
  121. data/spec/models/face_detection_spec.rb +1 -1
  122. data/spec/models/face_occluded_spec.rb +1 -1
  123. data/spec/models/field_summary_dto_spec.rb +1 -1
  124. data/spec/models/file_dto_spec.rb +1 -1
  125. data/spec/models/file_list_dto_spec.rb +1 -1
  126. data/spec/models/file_small_dto_spec.rb +17 -17
  127. data/spec/models/file_upload_dto_spec.rb +1 -1
  128. data/spec/models/file_w_ith_url_dto_spec.rb +1 -1
  129. data/spec/models/files_summary_dto_spec.rb +1 -1
  130. data/spec/models/forgot_password_dto_spec.rb +1 -1
  131. data/spec/models/gender_spec.rb +1 -1
  132. data/spec/models/genre_dto_spec.rb +1 -1
  133. data/spec/models/genre_minimal_dto_spec.rb +1 -1
  134. data/spec/models/genres_summary_dto_spec.rb +1 -1
  135. data/spec/models/image_quality_spec.rb +1 -1
  136. data/spec/models/image_recognition_response_spec.rb +1 -1
  137. data/spec/models/init_put_recording_audio_dto_spec.rb +1 -1
  138. data/spec/models/instance_spec.rb +1 -1
  139. data/spec/models/jwt_token_dto_spec.rb +1 -1
  140. data/spec/models/label_alias_spec.rb +1 -1
  141. data/spec/models/label_category_spec.rb +1 -1
  142. data/spec/models/label_detection_spec.rb +1 -1
  143. data/spec/models/label_spec.rb +1 -1
  144. data/spec/models/landmark_spec.rb +1 -1
  145. data/spec/models/login_dto_spec.rb +1 -1
  146. data/spec/models/mouth_open_spec.rb +1 -1
  147. data/spec/models/musical_features_dto_spec.rb +141 -141
  148. data/spec/models/mustache_spec.rb +1 -1
  149. data/spec/models/parent_spec.rb +1 -1
  150. data/spec/models/party_small_dto_spec.rb +1 -1
  151. data/spec/models/pose_spec.rb +1 -1
  152. data/spec/models/recording_for_similarity_search_dto_spec.rb +1 -1
  153. data/spec/models/recording_genre_prediction_dto_spec.rb +1 -1
  154. data/spec/models/recording_list_dto_spec.rb +1 -1
  155. data/spec/models/recording_medium_dto_spec.rb +3 -3
  156. data/spec/models/recording_minimal_with_musical_features_dto_spec.rb +1 -1
  157. data/spec/models/recording_minimal_with_taggrams_dto_spec.rb +1 -1
  158. data/spec/models/recording_minimal_with_tagstrengths_dto_spec.rb +1 -1
  159. data/spec/models/recording_party_dto_spec.rb +1 -1
  160. data/spec/models/recording_small_dto_spec.rb +7 -1
  161. data/spec/models/recording_tag_small_dto_spec.rb +1 -1
  162. data/spec/models/save_user_dto_spec.rb +1 -1
  163. data/spec/models/search_filter_values_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/smile_spec.rb +1 -1
  167. data/spec/models/sunglasses_spec.rb +1 -1
  168. data/spec/models/tag_dto_spec.rb +3 -3
  169. data/spec/models/tag_small_dto_spec.rb +1 -1
  170. data/spec/models/taggram_dto_spec.rb +1 -1
  171. data/spec/models/tags_summary_dto_spec.rb +1 -1
  172. data/spec/models/tagstrength_dto_spec.rb +1 -1
  173. data/spec/models/title_dto_spec.rb +1 -1
  174. data/spec/models/token_request_spec.rb +1 -1
  175. data/spec/models/track_dto_spec.rb +1 -1
  176. data/spec/models/update_password_dto_spec.rb +1 -1
  177. data/spec/models/user_dto_spec.rb +1 -1
  178. data/spec/models/video_recognition_response_spec.rb +1 -1
  179. data/spec/spec_helper.rb +1 -1
  180. metadata +67 -151
  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,285 +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.6
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
- # Party (person, group or organization) with a large field-set.
18
- class PartyLargeDTO
19
- attr_accessor :full_name
20
-
21
- attr_accessor :birth_date
22
-
23
- attr_accessor :death_date
24
-
25
- attr_accessor :birth_year
26
-
27
- attr_accessor :death_year
28
-
29
- attr_accessor :birth_place
30
-
31
- attr_accessor :musicbrainz_type
32
-
33
- attr_accessor :area
34
-
35
- # Attribute mapping from ruby-style variable name to JSON key.
36
- def self.attribute_map
37
- {
38
- :'full_name' => :'fullName',
39
- :'birth_date' => :'birthDate',
40
- :'death_date' => :'deathDate',
41
- :'birth_year' => :'birthYear',
42
- :'death_year' => :'deathYear',
43
- :'birth_place' => :'birthPlace',
44
- :'musicbrainz_type' => :'musicbrainzType',
45
- :'area' => :'area'
46
- }
47
- end
48
-
49
- # Returns all the JSON keys this model knows about
50
- def self.acceptable_attributes
51
- attribute_map.values
52
- end
53
-
54
- # Attribute type mapping.
55
- def self.openapi_types
56
- {
57
- :'full_name' => :'String',
58
- :'birth_date' => :'String',
59
- :'death_date' => :'String',
60
- :'birth_year' => :'String',
61
- :'death_year' => :'String',
62
- :'birth_place' => :'String',
63
- :'musicbrainz_type' => :'String',
64
- :'area' => :'String'
65
- }
66
- end
67
-
68
- # List of attributes with nullable: true
69
- def self.openapi_nullable
70
- Set.new([
71
- ])
72
- end
73
-
74
- # Initializes the object
75
- # @param [Hash] attributes Model attributes in the form of hash
76
- def initialize(attributes = {})
77
- if (!attributes.is_a?(Hash))
78
- fail ArgumentError, "The input argument (attributes) must be a hash in `SongtradrApiClientRuby::PartyLargeDTO` initialize method"
79
- end
80
-
81
- # check to see if the attribute exists and convert string to symbol for hash key
82
- attributes = attributes.each_with_object({}) { |(k, v), h|
83
- if (!self.class.attribute_map.key?(k.to_sym))
84
- fail ArgumentError, "`#{k}` is not a valid attribute in `SongtradrApiClientRuby::PartyLargeDTO`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
85
- end
86
- h[k.to_sym] = v
87
- }
88
-
89
- if attributes.key?(:'full_name')
90
- self.full_name = attributes[:'full_name']
91
- else
92
- self.full_name = nil
93
- end
94
-
95
- if attributes.key?(:'birth_date')
96
- self.birth_date = attributes[:'birth_date']
97
- end
98
-
99
- if attributes.key?(:'death_date')
100
- self.death_date = attributes[:'death_date']
101
- end
102
-
103
- if attributes.key?(:'birth_year')
104
- self.birth_year = attributes[:'birth_year']
105
- end
106
-
107
- if attributes.key?(:'death_year')
108
- self.death_year = attributes[:'death_year']
109
- end
110
-
111
- if attributes.key?(:'birth_place')
112
- self.birth_place = attributes[:'birth_place']
113
- end
114
-
115
- if attributes.key?(:'musicbrainz_type')
116
- self.musicbrainz_type = attributes[:'musicbrainz_type']
117
- end
118
-
119
- if attributes.key?(:'area')
120
- self.area = attributes[:'area']
121
- end
122
- end
123
-
124
- # Show invalid properties with the reasons. Usually used together with valid?
125
- # @return Array for valid properties with the reasons
126
- def list_invalid_properties
127
- warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
128
- invalid_properties = Array.new
129
- if @full_name.nil?
130
- invalid_properties.push('invalid value for "full_name", full_name cannot be nil.')
131
- end
132
-
133
- invalid_properties
134
- end
135
-
136
- # Check to see if the all the properties in the model are valid
137
- # @return true if the model is valid
138
- def valid?
139
- warn '[DEPRECATED] the `valid?` method is obsolete'
140
- return false if @full_name.nil?
141
- true
142
- end
143
-
144
- # Checks equality by comparing each attribute.
145
- # @param [Object] Object to be compared
146
- def ==(o)
147
- return true if self.equal?(o)
148
- self.class == o.class &&
149
- full_name == o.full_name &&
150
- birth_date == o.birth_date &&
151
- death_date == o.death_date &&
152
- birth_year == o.birth_year &&
153
- death_year == o.death_year &&
154
- birth_place == o.birth_place &&
155
- musicbrainz_type == o.musicbrainz_type &&
156
- area == o.area
157
- end
158
-
159
- # @see the `==` method
160
- # @param [Object] Object to be compared
161
- def eql?(o)
162
- self == o
163
- end
164
-
165
- # Calculates hash code according to all attributes.
166
- # @return [Integer] Hash code
167
- def hash
168
- [full_name, birth_date, death_date, birth_year, death_year, birth_place, musicbrainz_type, area].hash
169
- end
170
-
171
- # Builds the object from hash
172
- # @param [Hash] attributes Model attributes in the form of hash
173
- # @return [Object] Returns the model itself
174
- def self.build_from_hash(attributes)
175
- return nil unless attributes.is_a?(Hash)
176
- attributes = attributes.transform_keys(&:to_sym)
177
- transformed_hash = {}
178
- openapi_types.each_pair do |key, type|
179
- if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
180
- transformed_hash["#{key}"] = nil
181
- elsif type =~ /\AArray<(.*)>/i
182
- # check to ensure the input is an array given that the attribute
183
- # is documented as an array but the input is not
184
- if attributes[attribute_map[key]].is_a?(Array)
185
- transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
186
- end
187
- elsif !attributes[attribute_map[key]].nil?
188
- transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
189
- end
190
- end
191
- new(transformed_hash)
192
- end
193
-
194
- # Deserializes the data based on type
195
- # @param string type Data type
196
- # @param string value Value to be deserialized
197
- # @return [Object] Deserialized data
198
- def self._deserialize(type, value)
199
- case type.to_sym
200
- when :Time
201
- Time.parse(value)
202
- when :Date
203
- Date.parse(value)
204
- when :String
205
- value.to_s
206
- when :Integer
207
- value.to_i
208
- when :Float
209
- value.to_f
210
- when :Boolean
211
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
212
- true
213
- else
214
- false
215
- end
216
- when :Object
217
- # generic object (usually a Hash), return directly
218
- value
219
- when /\AArray<(?<inner_type>.+)>\z/
220
- inner_type = Regexp.last_match[:inner_type]
221
- value.map { |v| _deserialize(inner_type, v) }
222
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
223
- k_type = Regexp.last_match[:k_type]
224
- v_type = Regexp.last_match[:v_type]
225
- {}.tap do |hash|
226
- value.each do |k, v|
227
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
228
- end
229
- end
230
- else # model
231
- # models (e.g. Pet) or oneOf
232
- klass = SongtradrApiClientRuby.const_get(type)
233
- klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
234
- end
235
- end
236
-
237
- # Returns the string representation of the object
238
- # @return [String] String presentation of the object
239
- def to_s
240
- to_hash.to_s
241
- end
242
-
243
- # to_body is an alias to to_hash (backward compatibility)
244
- # @return [Hash] Returns the object in the form of hash
245
- def to_body
246
- to_hash
247
- end
248
-
249
- # Returns the object in the form of hash
250
- # @return [Hash] Returns the object in the form of hash
251
- def to_hash
252
- hash = {}
253
- self.class.attribute_map.each_pair do |attr, param|
254
- value = self.send(attr)
255
- if value.nil?
256
- is_nullable = self.class.openapi_nullable.include?(attr)
257
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
258
- end
259
-
260
- hash[param] = _to_hash(value)
261
- end
262
- hash
263
- end
264
-
265
- # Outputs non-array value in the form of hash
266
- # For object, use to_hash. Otherwise, just return the value
267
- # @param [Object] value Any valid value
268
- # @return [Hash] Returns the value in the form of hash
269
- def _to_hash(value)
270
- if value.is_a?(Array)
271
- value.compact.map { |v| _to_hash(v) }
272
- elsif value.is_a?(Hash)
273
- {}.tap do |hash|
274
- value.each { |k, v| hash[k] = _to_hash(v) }
275
- end
276
- elsif value.respond_to? :to_hash
277
- value.to_hash
278
- else
279
- value
280
- end
281
- end
282
-
283
- end
284
-
285
- end
@@ -1,350 +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.6
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
- # Details on a playlist
18
- class PlaylistLargeDTO
19
- attr_accessor :name
20
-
21
- attr_accessor :state
22
-
23
- attr_accessor :description
24
-
25
- attr_accessor :usages
26
-
27
- attr_accessor :asset_url
28
-
29
- attr_accessor :pretzel_tier
30
-
31
- attr_accessor :usage
32
-
33
- attr_accessor :tracks
34
-
35
- attr_accessor :songtradr_playlist_guid
36
-
37
- attr_accessor :created
38
-
39
- attr_accessor :updated
40
-
41
- class EnumAttributeValidator
42
- attr_reader :datatype
43
- attr_reader :allowable_values
44
-
45
- def initialize(datatype, allowable_values)
46
- @allowable_values = allowable_values.map do |value|
47
- case datatype.to_s
48
- when /Integer/i
49
- value.to_i
50
- when /Float/i
51
- value.to_f
52
- else
53
- value
54
- end
55
- end
56
- end
57
-
58
- def valid?(value)
59
- !value || allowable_values.include?(value)
60
- end
61
- end
62
-
63
- # Attribute mapping from ruby-style variable name to JSON key.
64
- def self.attribute_map
65
- {
66
- :'name' => :'name',
67
- :'state' => :'state',
68
- :'description' => :'description',
69
- :'usages' => :'usages',
70
- :'asset_url' => :'assetURL',
71
- :'pretzel_tier' => :'pretzelTier',
72
- :'usage' => :'usage',
73
- :'tracks' => :'tracks',
74
- :'songtradr_playlist_guid' => :'songtradrPlaylistGuid',
75
- :'created' => :'created',
76
- :'updated' => :'updated'
77
- }
78
- end
79
-
80
- # Returns all the JSON keys this model knows about
81
- def self.acceptable_attributes
82
- attribute_map.values
83
- end
84
-
85
- # Attribute type mapping.
86
- def self.openapi_types
87
- {
88
- :'name' => :'String',
89
- :'state' => :'String',
90
- :'description' => :'String',
91
- :'usages' => :'Array<UsageDTO>',
92
- :'asset_url' => :'String',
93
- :'pretzel_tier' => :'String',
94
- :'usage' => :'String',
95
- :'tracks' => :'Array<RecordingPlaylistDTO>',
96
- :'songtradr_playlist_guid' => :'String',
97
- :'created' => :'Time',
98
- :'updated' => :'Time'
99
- }
100
- end
101
-
102
- # List of attributes with nullable: true
103
- def self.openapi_nullable
104
- Set.new([
105
- ])
106
- end
107
-
108
- # Initializes the object
109
- # @param [Hash] attributes Model attributes in the form of hash
110
- def initialize(attributes = {})
111
- if (!attributes.is_a?(Hash))
112
- fail ArgumentError, "The input argument (attributes) must be a hash in `SongtradrApiClientRuby::PlaylistLargeDTO` initialize method"
113
- end
114
-
115
- # check to see if the attribute exists and convert string to symbol for hash key
116
- attributes = attributes.each_with_object({}) { |(k, v), h|
117
- if (!self.class.attribute_map.key?(k.to_sym))
118
- fail ArgumentError, "`#{k}` is not a valid attribute in `SongtradrApiClientRuby::PlaylistLargeDTO`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
119
- end
120
- h[k.to_sym] = v
121
- }
122
-
123
- if attributes.key?(:'name')
124
- self.name = attributes[:'name']
125
- else
126
- self.name = nil
127
- end
128
-
129
- if attributes.key?(:'state')
130
- self.state = attributes[:'state']
131
- end
132
-
133
- if attributes.key?(:'description')
134
- self.description = attributes[:'description']
135
- end
136
-
137
- if attributes.key?(:'usages')
138
- if (value = attributes[:'usages']).is_a?(Array)
139
- self.usages = value
140
- end
141
- end
142
-
143
- if attributes.key?(:'asset_url')
144
- self.asset_url = attributes[:'asset_url']
145
- end
146
-
147
- if attributes.key?(:'pretzel_tier')
148
- self.pretzel_tier = attributes[:'pretzel_tier']
149
- end
150
-
151
- if attributes.key?(:'usage')
152
- self.usage = attributes[:'usage']
153
- end
154
-
155
- if attributes.key?(:'tracks')
156
- if (value = attributes[:'tracks']).is_a?(Array)
157
- self.tracks = value
158
- end
159
- end
160
-
161
- if attributes.key?(:'songtradr_playlist_guid')
162
- self.songtradr_playlist_guid = attributes[:'songtradr_playlist_guid']
163
- end
164
-
165
- if attributes.key?(:'created')
166
- self.created = attributes[:'created']
167
- end
168
-
169
- if attributes.key?(:'updated')
170
- self.updated = attributes[:'updated']
171
- end
172
- end
173
-
174
- # Show invalid properties with the reasons. Usually used together with valid?
175
- # @return Array for valid properties with the reasons
176
- def list_invalid_properties
177
- warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
178
- invalid_properties = Array.new
179
- if @name.nil?
180
- invalid_properties.push('invalid value for "name", name cannot be nil.')
181
- end
182
-
183
- invalid_properties
184
- end
185
-
186
- # Check to see if the all the properties in the model are valid
187
- # @return true if the model is valid
188
- def valid?
189
- warn '[DEPRECATED] the `valid?` method is obsolete'
190
- return false if @name.nil?
191
- state_validator = EnumAttributeValidator.new('String', ["active", "draft"])
192
- return false unless state_validator.valid?(@state)
193
- true
194
- end
195
-
196
- # Custom attribute writer method checking allowed values (enum).
197
- # @param [Object] state Object to be assigned
198
- def state=(state)
199
- validator = EnumAttributeValidator.new('String', ["active", "draft"])
200
- unless validator.valid?(state)
201
- fail ArgumentError, "invalid value for \"state\", must be one of #{validator.allowable_values}."
202
- end
203
- @state = state
204
- end
205
-
206
- # Checks equality by comparing each attribute.
207
- # @param [Object] Object to be compared
208
- def ==(o)
209
- return true if self.equal?(o)
210
- self.class == o.class &&
211
- name == o.name &&
212
- state == o.state &&
213
- description == o.description &&
214
- usages == o.usages &&
215
- asset_url == o.asset_url &&
216
- pretzel_tier == o.pretzel_tier &&
217
- usage == o.usage &&
218
- tracks == o.tracks &&
219
- songtradr_playlist_guid == o.songtradr_playlist_guid &&
220
- created == o.created &&
221
- updated == o.updated
222
- end
223
-
224
- # @see the `==` method
225
- # @param [Object] Object to be compared
226
- def eql?(o)
227
- self == o
228
- end
229
-
230
- # Calculates hash code according to all attributes.
231
- # @return [Integer] Hash code
232
- def hash
233
- [name, state, description, usages, asset_url, pretzel_tier, usage, tracks, songtradr_playlist_guid, created, updated].hash
234
- end
235
-
236
- # Builds the object from hash
237
- # @param [Hash] attributes Model attributes in the form of hash
238
- # @return [Object] Returns the model itself
239
- def self.build_from_hash(attributes)
240
- return nil unless attributes.is_a?(Hash)
241
- attributes = attributes.transform_keys(&:to_sym)
242
- transformed_hash = {}
243
- openapi_types.each_pair do |key, type|
244
- if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
245
- transformed_hash["#{key}"] = nil
246
- elsif type =~ /\AArray<(.*)>/i
247
- # check to ensure the input is an array given that the attribute
248
- # is documented as an array but the input is not
249
- if attributes[attribute_map[key]].is_a?(Array)
250
- transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
251
- end
252
- elsif !attributes[attribute_map[key]].nil?
253
- transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
254
- end
255
- end
256
- new(transformed_hash)
257
- end
258
-
259
- # Deserializes the data based on type
260
- # @param string type Data type
261
- # @param string value Value to be deserialized
262
- # @return [Object] Deserialized data
263
- def self._deserialize(type, value)
264
- case type.to_sym
265
- when :Time
266
- Time.parse(value)
267
- when :Date
268
- Date.parse(value)
269
- when :String
270
- value.to_s
271
- when :Integer
272
- value.to_i
273
- when :Float
274
- value.to_f
275
- when :Boolean
276
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
277
- true
278
- else
279
- false
280
- end
281
- when :Object
282
- # generic object (usually a Hash), return directly
283
- value
284
- when /\AArray<(?<inner_type>.+)>\z/
285
- inner_type = Regexp.last_match[:inner_type]
286
- value.map { |v| _deserialize(inner_type, v) }
287
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
288
- k_type = Regexp.last_match[:k_type]
289
- v_type = Regexp.last_match[:v_type]
290
- {}.tap do |hash|
291
- value.each do |k, v|
292
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
293
- end
294
- end
295
- else # model
296
- # models (e.g. Pet) or oneOf
297
- klass = SongtradrApiClientRuby.const_get(type)
298
- klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
299
- end
300
- end
301
-
302
- # Returns the string representation of the object
303
- # @return [String] String presentation of the object
304
- def to_s
305
- to_hash.to_s
306
- end
307
-
308
- # to_body is an alias to to_hash (backward compatibility)
309
- # @return [Hash] Returns the object in the form of hash
310
- def to_body
311
- to_hash
312
- end
313
-
314
- # Returns the object in the form of hash
315
- # @return [Hash] Returns the object in the form of hash
316
- def to_hash
317
- hash = {}
318
- self.class.attribute_map.each_pair do |attr, param|
319
- value = self.send(attr)
320
- if value.nil?
321
- is_nullable = self.class.openapi_nullable.include?(attr)
322
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
323
- end
324
-
325
- hash[param] = _to_hash(value)
326
- end
327
- hash
328
- end
329
-
330
- # Outputs non-array value in the form of hash
331
- # For object, use to_hash. Otherwise, just return the value
332
- # @param [Object] value Any valid value
333
- # @return [Hash] Returns the value in the form of hash
334
- def _to_hash(value)
335
- if value.is_a?(Array)
336
- value.compact.map { |v| _to_hash(v) }
337
- elsif value.is_a?(Hash)
338
- {}.tap do |hash|
339
- value.each { |k, v| hash[k] = _to_hash(v) }
340
- end
341
- elsif value.respond_to? :to_hash
342
- value.to_hash
343
- else
344
- value
345
- end
346
- end
347
-
348
- end
349
-
350
- end