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,323 +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
- # Product details with a mid-sized field-set.
18
- class ProductMediumDTO
19
- attr_accessor :duration
20
-
21
- attr_accessor :genres
22
-
23
- attr_accessor :titles
24
-
25
- attr_accessor :pline
26
-
27
- attr_accessor :gtin
28
-
29
- attr_accessor :grid
30
-
31
- attr_accessor :release_date
32
-
33
- attr_accessor :takedown_date
34
-
35
- attr_accessor :parties
36
-
37
- # Attribute mapping from ruby-style variable name to JSON key.
38
- def self.attribute_map
39
- {
40
- :'duration' => :'duration',
41
- :'genres' => :'genres',
42
- :'titles' => :'titles',
43
- :'pline' => :'pline',
44
- :'gtin' => :'gtin',
45
- :'grid' => :'grid',
46
- :'release_date' => :'releaseDate',
47
- :'takedown_date' => :'takedownDate',
48
- :'parties' => :'parties'
49
- }
50
- end
51
-
52
- # Returns all the JSON keys this model knows about
53
- def self.acceptable_attributes
54
- attribute_map.values
55
- end
56
-
57
- # Attribute type mapping.
58
- def self.openapi_types
59
- {
60
- :'duration' => :'Time',
61
- :'genres' => :'Array<GenreMinimalDTO>',
62
- :'titles' => :'Array<TitleDTO>',
63
- :'pline' => :'PLineDTO',
64
- :'gtin' => :'String',
65
- :'grid' => :'String',
66
- :'release_date' => :'Time',
67
- :'takedown_date' => :'Time',
68
- :'parties' => :'Array<ProductPartyDTO>'
69
- }
70
- end
71
-
72
- # List of attributes with nullable: true
73
- def self.openapi_nullable
74
- Set.new([
75
- ])
76
- end
77
-
78
- # Initializes the object
79
- # @param [Hash] attributes Model attributes in the form of hash
80
- def initialize(attributes = {})
81
- if (!attributes.is_a?(Hash))
82
- fail ArgumentError, "The input argument (attributes) must be a hash in `SongtradrApiClientRuby::ProductMediumDTO` initialize method"
83
- end
84
-
85
- # check to see if the attribute exists and convert string to symbol for hash key
86
- attributes = attributes.each_with_object({}) { |(k, v), h|
87
- if (!self.class.attribute_map.key?(k.to_sym))
88
- fail ArgumentError, "`#{k}` is not a valid attribute in `SongtradrApiClientRuby::ProductMediumDTO`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
89
- end
90
- h[k.to_sym] = v
91
- }
92
-
93
- if attributes.key?(:'duration')
94
- self.duration = attributes[:'duration']
95
- end
96
-
97
- if attributes.key?(:'genres')
98
- if (value = attributes[:'genres']).is_a?(Array)
99
- self.genres = value
100
- end
101
- end
102
-
103
- if attributes.key?(:'titles')
104
- if (value = attributes[:'titles']).is_a?(Array)
105
- self.titles = value
106
- end
107
- end
108
-
109
- if attributes.key?(:'pline')
110
- self.pline = attributes[:'pline']
111
- end
112
-
113
- if attributes.key?(:'gtin')
114
- self.gtin = attributes[:'gtin']
115
- end
116
-
117
- if attributes.key?(:'grid')
118
- self.grid = attributes[:'grid']
119
- end
120
-
121
- if attributes.key?(:'release_date')
122
- self.release_date = attributes[:'release_date']
123
- end
124
-
125
- if attributes.key?(:'takedown_date')
126
- self.takedown_date = attributes[:'takedown_date']
127
- end
128
-
129
- if attributes.key?(:'parties')
130
- if (value = attributes[:'parties']).is_a?(Array)
131
- self.parties = value
132
- end
133
- end
134
- end
135
-
136
- # Show invalid properties with the reasons. Usually used together with valid?
137
- # @return Array for valid properties with the reasons
138
- def list_invalid_properties
139
- warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
140
- invalid_properties = Array.new
141
- invalid_properties
142
- end
143
-
144
- # Check to see if the all the properties in the model are valid
145
- # @return true if the model is valid
146
- def valid?
147
- warn '[DEPRECATED] the `valid?` method is obsolete'
148
- true
149
- end
150
-
151
- # Custom attribute writer method with validation
152
- # @param [Object] genres Value to be assigned
153
- def genres=(genres)
154
- if genres.nil?
155
- fail ArgumentError, 'genres cannot be nil'
156
- end
157
-
158
- @genres = genres
159
- end
160
-
161
- # Custom attribute writer method with validation
162
- # @param [Object] titles Value to be assigned
163
- def titles=(titles)
164
- if titles.nil?
165
- fail ArgumentError, 'titles cannot be nil'
166
- end
167
-
168
- @titles = titles
169
- end
170
-
171
- # Custom attribute writer method with validation
172
- # @param [Object] parties Value to be assigned
173
- def parties=(parties)
174
- if parties.nil?
175
- fail ArgumentError, 'parties cannot be nil'
176
- end
177
-
178
- @parties = parties
179
- end
180
-
181
- # Checks equality by comparing each attribute.
182
- # @param [Object] Object to be compared
183
- def ==(o)
184
- return true if self.equal?(o)
185
- self.class == o.class &&
186
- duration == o.duration &&
187
- genres == o.genres &&
188
- titles == o.titles &&
189
- pline == o.pline &&
190
- gtin == o.gtin &&
191
- grid == o.grid &&
192
- release_date == o.release_date &&
193
- takedown_date == o.takedown_date &&
194
- parties == o.parties
195
- end
196
-
197
- # @see the `==` method
198
- # @param [Object] Object to be compared
199
- def eql?(o)
200
- self == o
201
- end
202
-
203
- # Calculates hash code according to all attributes.
204
- # @return [Integer] Hash code
205
- def hash
206
- [duration, genres, titles, pline, gtin, grid, release_date, takedown_date, parties].hash
207
- end
208
-
209
- # Builds the object from hash
210
- # @param [Hash] attributes Model attributes in the form of hash
211
- # @return [Object] Returns the model itself
212
- def self.build_from_hash(attributes)
213
- return nil unless attributes.is_a?(Hash)
214
- attributes = attributes.transform_keys(&:to_sym)
215
- transformed_hash = {}
216
- openapi_types.each_pair do |key, type|
217
- if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
218
- transformed_hash["#{key}"] = nil
219
- elsif type =~ /\AArray<(.*)>/i
220
- # check to ensure the input is an array given that the attribute
221
- # is documented as an array but the input is not
222
- if attributes[attribute_map[key]].is_a?(Array)
223
- transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
224
- end
225
- elsif !attributes[attribute_map[key]].nil?
226
- transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
227
- end
228
- end
229
- new(transformed_hash)
230
- end
231
-
232
- # Deserializes the data based on type
233
- # @param string type Data type
234
- # @param string value Value to be deserialized
235
- # @return [Object] Deserialized data
236
- def self._deserialize(type, value)
237
- case type.to_sym
238
- when :Time
239
- Time.parse(value)
240
- when :Date
241
- Date.parse(value)
242
- when :String
243
- value.to_s
244
- when :Integer
245
- value.to_i
246
- when :Float
247
- value.to_f
248
- when :Boolean
249
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
250
- true
251
- else
252
- false
253
- end
254
- when :Object
255
- # generic object (usually a Hash), return directly
256
- value
257
- when /\AArray<(?<inner_type>.+)>\z/
258
- inner_type = Regexp.last_match[:inner_type]
259
- value.map { |v| _deserialize(inner_type, v) }
260
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
261
- k_type = Regexp.last_match[:k_type]
262
- v_type = Regexp.last_match[:v_type]
263
- {}.tap do |hash|
264
- value.each do |k, v|
265
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
266
- end
267
- end
268
- else # model
269
- # models (e.g. Pet) or oneOf
270
- klass = SongtradrApiClientRuby.const_get(type)
271
- klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
272
- end
273
- end
274
-
275
- # Returns the string representation of the object
276
- # @return [String] String presentation of the object
277
- def to_s
278
- to_hash.to_s
279
- end
280
-
281
- # to_body is an alias to to_hash (backward compatibility)
282
- # @return [Hash] Returns the object in the form of hash
283
- def to_body
284
- to_hash
285
- end
286
-
287
- # Returns the object in the form of hash
288
- # @return [Hash] Returns the object in the form of hash
289
- def to_hash
290
- hash = {}
291
- self.class.attribute_map.each_pair do |attr, param|
292
- value = self.send(attr)
293
- if value.nil?
294
- is_nullable = self.class.openapi_nullable.include?(attr)
295
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
296
- end
297
-
298
- hash[param] = _to_hash(value)
299
- end
300
- hash
301
- end
302
-
303
- # Outputs non-array value in the form of hash
304
- # For object, use to_hash. Otherwise, just return the value
305
- # @param [Object] value Any valid value
306
- # @return [Hash] Returns the value in the form of hash
307
- def _to_hash(value)
308
- if value.is_a?(Array)
309
- value.compact.map { |v| _to_hash(v) }
310
- elsif value.is_a?(Hash)
311
- {}.tap do |hash|
312
- value.each { |k, v| hash[k] = _to_hash(v) }
313
- end
314
- elsif value.respond_to? :to_hash
315
- value.to_hash
316
- else
317
- value
318
- end
319
- end
320
-
321
- end
322
-
323
- end
@@ -1,233 +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
- # Parties (persons, groups or organizations) that have contributed to a product.
18
- class ProductPartyDTO
19
- attr_accessor :party
20
-
21
- attr_accessor :contributor_types
22
-
23
- # Attribute mapping from ruby-style variable name to JSON key.
24
- def self.attribute_map
25
- {
26
- :'party' => :'party',
27
- :'contributor_types' => :'contributorTypes'
28
- }
29
- end
30
-
31
- # Returns all the JSON keys this model knows about
32
- def self.acceptable_attributes
33
- attribute_map.values
34
- end
35
-
36
- # Attribute type mapping.
37
- def self.openapi_types
38
- {
39
- :'party' => :'PartySmallDTO',
40
- :'contributor_types' => :'Array<ContributorTypeDTO>'
41
- }
42
- end
43
-
44
- # List of attributes with nullable: true
45
- def self.openapi_nullable
46
- Set.new([
47
- ])
48
- end
49
-
50
- # Initializes the object
51
- # @param [Hash] attributes Model attributes in the form of hash
52
- def initialize(attributes = {})
53
- if (!attributes.is_a?(Hash))
54
- fail ArgumentError, "The input argument (attributes) must be a hash in `SongtradrApiClientRuby::ProductPartyDTO` initialize method"
55
- end
56
-
57
- # check to see if the attribute exists and convert string to symbol for hash key
58
- attributes = attributes.each_with_object({}) { |(k, v), h|
59
- if (!self.class.attribute_map.key?(k.to_sym))
60
- fail ArgumentError, "`#{k}` is not a valid attribute in `SongtradrApiClientRuby::ProductPartyDTO`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
61
- end
62
- h[k.to_sym] = v
63
- }
64
-
65
- if attributes.key?(:'party')
66
- self.party = attributes[:'party']
67
- else
68
- self.party = nil
69
- end
70
-
71
- if attributes.key?(:'contributor_types')
72
- if (value = attributes[:'contributor_types']).is_a?(Array)
73
- self.contributor_types = value
74
- end
75
- end
76
- end
77
-
78
- # Show invalid properties with the reasons. Usually used together with valid?
79
- # @return Array for valid properties with the reasons
80
- def list_invalid_properties
81
- warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
82
- invalid_properties = Array.new
83
- if @party.nil?
84
- invalid_properties.push('invalid value for "party", party cannot be nil.')
85
- end
86
-
87
- invalid_properties
88
- end
89
-
90
- # Check to see if the all the properties in the model are valid
91
- # @return true if the model is valid
92
- def valid?
93
- warn '[DEPRECATED] the `valid?` method is obsolete'
94
- return false if @party.nil?
95
- true
96
- end
97
-
98
- # Checks equality by comparing each attribute.
99
- # @param [Object] Object to be compared
100
- def ==(o)
101
- return true if self.equal?(o)
102
- self.class == o.class &&
103
- party == o.party &&
104
- contributor_types == o.contributor_types
105
- end
106
-
107
- # @see the `==` method
108
- # @param [Object] Object to be compared
109
- def eql?(o)
110
- self == o
111
- end
112
-
113
- # Calculates hash code according to all attributes.
114
- # @return [Integer] Hash code
115
- def hash
116
- [party, contributor_types].hash
117
- end
118
-
119
- # Builds the object from hash
120
- # @param [Hash] attributes Model attributes in the form of hash
121
- # @return [Object] Returns the model itself
122
- def self.build_from_hash(attributes)
123
- return nil unless attributes.is_a?(Hash)
124
- attributes = attributes.transform_keys(&:to_sym)
125
- transformed_hash = {}
126
- openapi_types.each_pair do |key, type|
127
- if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
128
- transformed_hash["#{key}"] = nil
129
- elsif type =~ /\AArray<(.*)>/i
130
- # check to ensure the input is an array given that the attribute
131
- # is documented as an array but the input is not
132
- if attributes[attribute_map[key]].is_a?(Array)
133
- transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
134
- end
135
- elsif !attributes[attribute_map[key]].nil?
136
- transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
137
- end
138
- end
139
- new(transformed_hash)
140
- end
141
-
142
- # Deserializes the data based on type
143
- # @param string type Data type
144
- # @param string value Value to be deserialized
145
- # @return [Object] Deserialized data
146
- def self._deserialize(type, value)
147
- case type.to_sym
148
- when :Time
149
- Time.parse(value)
150
- when :Date
151
- Date.parse(value)
152
- when :String
153
- value.to_s
154
- when :Integer
155
- value.to_i
156
- when :Float
157
- value.to_f
158
- when :Boolean
159
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
160
- true
161
- else
162
- false
163
- end
164
- when :Object
165
- # generic object (usually a Hash), return directly
166
- value
167
- when /\AArray<(?<inner_type>.+)>\z/
168
- inner_type = Regexp.last_match[:inner_type]
169
- value.map { |v| _deserialize(inner_type, v) }
170
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
171
- k_type = Regexp.last_match[:k_type]
172
- v_type = Regexp.last_match[:v_type]
173
- {}.tap do |hash|
174
- value.each do |k, v|
175
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
176
- end
177
- end
178
- else # model
179
- # models (e.g. Pet) or oneOf
180
- klass = SongtradrApiClientRuby.const_get(type)
181
- klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
182
- end
183
- end
184
-
185
- # Returns the string representation of the object
186
- # @return [String] String presentation of the object
187
- def to_s
188
- to_hash.to_s
189
- end
190
-
191
- # to_body is an alias to to_hash (backward compatibility)
192
- # @return [Hash] Returns the object in the form of hash
193
- def to_body
194
- to_hash
195
- end
196
-
197
- # Returns the object in the form of hash
198
- # @return [Hash] Returns the object in the form of hash
199
- def to_hash
200
- hash = {}
201
- self.class.attribute_map.each_pair do |attr, param|
202
- value = self.send(attr)
203
- if value.nil?
204
- is_nullable = self.class.openapi_nullable.include?(attr)
205
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
206
- end
207
-
208
- hash[param] = _to_hash(value)
209
- end
210
- hash
211
- end
212
-
213
- # Outputs non-array value in the form of hash
214
- # For object, use to_hash. Otherwise, just return the value
215
- # @param [Object] value Any valid value
216
- # @return [Hash] Returns the value in the form of hash
217
- def _to_hash(value)
218
- if value.is_a?(Array)
219
- value.compact.map { |v| _to_hash(v) }
220
- elsif value.is_a?(Hash)
221
- {}.tap do |hash|
222
- value.each { |k, v| hash[k] = _to_hash(v) }
223
- end
224
- elsif value.respond_to? :to_hash
225
- value.to_hash
226
- else
227
- value
228
- end
229
- end
230
-
231
- end
232
-
233
- end