songtradr_api_client_ruby 1.12.21

Sign up to get free protection for your applications and to get access to all the features.
Files changed (225) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/Gemfile.lock +76 -0
  4. data/README.md +223 -0
  5. data/Rakefile +10 -0
  6. data/docs/AllowedValuesApi.md +200 -0
  7. data/docs/CategoryMediumDTO.md +22 -0
  8. data/docs/CategoryMinimalDTO.md +18 -0
  9. data/docs/ConfigAccessDTO.md +20 -0
  10. data/docs/ConfigIdentifierDTO.md +20 -0
  11. data/docs/ContributorTypeDTO.md +18 -0
  12. data/docs/ErrorResponse.md +26 -0
  13. data/docs/FieldSummaryDTO.md +22 -0
  14. data/docs/FileDTO.md +50 -0
  15. data/docs/FileListDTO.md +24 -0
  16. data/docs/FileMinimalWithUrlDTO.md +22 -0
  17. data/docs/FileSmallDTO.md +46 -0
  18. data/docs/FileUploadDTO.md +22 -0
  19. data/docs/FileWIthUrlDTO.md +20 -0
  20. data/docs/FilesSummaryDTO.md +30 -0
  21. data/docs/ForgotPasswordDTO.md +20 -0
  22. data/docs/GenreDTO.md +20 -0
  23. data/docs/GenreMinimalDTO.md +18 -0
  24. data/docs/GenresSummaryDTO.md +22 -0
  25. data/docs/InitPutRecordingAudioDTO.md +22 -0
  26. data/docs/JwtTokenDTO.md +22 -0
  27. data/docs/LoginDTO.md +24 -0
  28. data/docs/MusicalFeaturesDTO.md +186 -0
  29. data/docs/PLineDTO.md +20 -0
  30. data/docs/PartyApi.md +75 -0
  31. data/docs/PartyLargeDTO.md +32 -0
  32. data/docs/PartySmallDTO.md +20 -0
  33. data/docs/PlaylistApi.md +221 -0
  34. data/docs/PlaylistLargeDTO.md +38 -0
  35. data/docs/ProductMediumDTO.md +34 -0
  36. data/docs/ProductPartyDTO.md +20 -0
  37. data/docs/RecordingApi.md +789 -0
  38. data/docs/RecordingForSimilaritySearchDTO.md +20 -0
  39. data/docs/RecordingGenrePredictionDTO.md +22 -0
  40. data/docs/RecordingLargeDTO.md +40 -0
  41. data/docs/RecordingListDTO.md +24 -0
  42. data/docs/RecordingMediumDTO.md +36 -0
  43. data/docs/RecordingMinimalWithMusicalFeaturesDTO.md +20 -0
  44. data/docs/RecordingMinimalWithTaggramsDTO.md +22 -0
  45. data/docs/RecordingMinimalWithTagstrengthsDTO.md +20 -0
  46. data/docs/RecordingPartyDTO.md +20 -0
  47. data/docs/RecordingPlaylistDTO.md +24 -0
  48. data/docs/RecordingSmallDTO.md +24 -0
  49. data/docs/RecordingTagSmallDTO.md +18 -0
  50. data/docs/SaveFileRecordingDTO.md +236 -0
  51. data/docs/SavePlaylistDTO.md +34 -0
  52. data/docs/SaveRecordingGenreDTO.md +22 -0
  53. data/docs/SaveRecordingPartyDTO.md +20 -0
  54. data/docs/SaveRecordingPlaylistDTO.md +22 -0
  55. data/docs/SaveRecordingTagDTO.md +20 -0
  56. data/docs/SaveReferrerDTO.md +20 -0
  57. data/docs/SaveTaggramsDTO.md +82 -0
  58. data/docs/SaveUserDTO.md +28 -0
  59. data/docs/SearchFilterValuesDTO.md +98 -0
  60. data/docs/SearchRecordingGranularAbstractionDTO.md +20 -0
  61. data/docs/SearchRecordingGranularDTO.md +20 -0
  62. data/docs/SignUpDTO.md +24 -0
  63. data/docs/TagDTO.md +22 -0
  64. data/docs/TagSmallDTO.md +20 -0
  65. data/docs/TaggramDTO.md +26 -0
  66. data/docs/TagsSummaryDTO.md +22 -0
  67. data/docs/TagstrengthDTO.md +26 -0
  68. data/docs/TitleDTO.md +18 -0
  69. data/docs/TokenRequest.md +18 -0
  70. data/docs/TrackToMediumProductDTO.md +22 -0
  71. data/docs/UpdatePasswordDTO.md +20 -0
  72. data/docs/UsageDTO.md +18 -0
  73. data/docs/UserApi.md +1936 -0
  74. data/docs/UserDTO.md +56 -0
  75. data/getspec.rb +10 -0
  76. data/git_push.sh +57 -0
  77. data/lib/songtradr_api_client_ruby/api/allowed_values_api.rb +213 -0
  78. data/lib/songtradr_api_client_ruby/api/party_api.rb +84 -0
  79. data/lib/songtradr_api_client_ruby/api/playlist_api.rb +222 -0
  80. data/lib/songtradr_api_client_ruby/api/recording_api.rb +900 -0
  81. data/lib/songtradr_api_client_ruby/api/user_api.rb +2642 -0
  82. data/lib/songtradr_api_client_ruby/api_client.rb +428 -0
  83. data/lib/songtradr_api_client_ruby/api_error.rb +58 -0
  84. data/lib/songtradr_api_client_ruby/configuration.rb +380 -0
  85. data/lib/songtradr_api_client_ruby/models/category_medium_dto.rb +250 -0
  86. data/lib/songtradr_api_client_ruby/models/category_minimal_dto.rb +225 -0
  87. data/lib/songtradr_api_client_ruby/models/config_access_dto.rb +287 -0
  88. data/lib/songtradr_api_client_ruby/models/config_identifier_dto.rb +239 -0
  89. data/lib/songtradr_api_client_ruby/models/contributor_type_dto.rb +225 -0
  90. data/lib/songtradr_api_client_ruby/models/error_response.rb +276 -0
  91. data/lib/songtradr_api_client_ruby/models/field_summary_dto.rb +253 -0
  92. data/lib/songtradr_api_client_ruby/models/file_dto.rb +450 -0
  93. data/lib/songtradr_api_client_ruby/models/file_list_dto.rb +269 -0
  94. data/lib/songtradr_api_client_ruby/models/file_minimal_with_url_dto.rb +253 -0
  95. data/lib/songtradr_api_client_ruby/models/file_small_dto.rb +432 -0
  96. data/lib/songtradr_api_client_ruby/models/file_upload_dto.rb +244 -0
  97. data/lib/songtradr_api_client_ruby/models/file_w_ith_url_dto.rb +239 -0
  98. data/lib/songtradr_api_client_ruby/models/files_summary_dto.rb +287 -0
  99. data/lib/songtradr_api_client_ruby/models/forgot_password_dto.rb +267 -0
  100. data/lib/songtradr_api_client_ruby/models/genre_dto.rb +239 -0
  101. data/lib/songtradr_api_client_ruby/models/genre_minimal_dto.rb +225 -0
  102. data/lib/songtradr_api_client_ruby/models/genres_summary_dto.rb +248 -0
  103. data/lib/songtradr_api_client_ruby/models/init_put_recording_audio_dto.rb +238 -0
  104. data/lib/songtradr_api_client_ruby/models/jwt_token_dto.rb +248 -0
  105. data/lib/songtradr_api_client_ruby/models/login_dto.rb +257 -0
  106. data/lib/songtradr_api_client_ruby/models/musical_features_dto.rb +1532 -0
  107. data/lib/songtradr_api_client_ruby/models/p_line_dto.rb +234 -0
  108. data/lib/songtradr_api_client_ruby/models/party_large_dto.rb +288 -0
  109. data/lib/songtradr_api_client_ruby/models/party_small_dto.rb +239 -0
  110. data/lib/songtradr_api_client_ruby/models/playlist_large_dto.rb +353 -0
  111. data/lib/songtradr_api_client_ruby/models/product_medium_dto.rb +316 -0
  112. data/lib/songtradr_api_client_ruby/models/product_party_dto.rb +236 -0
  113. data/lib/songtradr_api_client_ruby/models/recording_for_similarity_search_dto.rb +239 -0
  114. data/lib/songtradr_api_client_ruby/models/recording_genre_prediction_dto.rb +253 -0
  115. data/lib/songtradr_api_client_ruby/models/recording_large_dto.rb +366 -0
  116. data/lib/songtradr_api_client_ruby/models/recording_list_dto.rb +269 -0
  117. data/lib/songtradr_api_client_ruby/models/recording_medium_dto.rb +340 -0
  118. data/lib/songtradr_api_client_ruby/models/recording_minimal_with_musical_features_dto.rb +236 -0
  119. data/lib/songtradr_api_client_ruby/models/recording_minimal_with_taggrams_dto.rb +248 -0
  120. data/lib/songtradr_api_client_ruby/models/recording_minimal_with_tagstrengths_dto.rb +236 -0
  121. data/lib/songtradr_api_client_ruby/models/recording_party_dto.rb +236 -0
  122. data/lib/songtradr_api_client_ruby/models/recording_playlist_dto.rb +247 -0
  123. data/lib/songtradr_api_client_ruby/models/recording_small_dto.rb +268 -0
  124. data/lib/songtradr_api_client_ruby/models/recording_tag_small_dto.rb +225 -0
  125. data/lib/songtradr_api_client_ruby/models/save_file_recording_dto.rb +1847 -0
  126. data/lib/songtradr_api_client_ruby/models/save_playlist_dto.rb +350 -0
  127. data/lib/songtradr_api_client_ruby/models/save_recording_genre_dto.rb +243 -0
  128. data/lib/songtradr_api_client_ruby/models/save_recording_party_dto.rb +273 -0
  129. data/lib/songtradr_api_client_ruby/models/save_recording_playlist_dto.rb +248 -0
  130. data/lib/songtradr_api_client_ruby/models/save_recording_tag_dto.rb +234 -0
  131. data/lib/songtradr_api_client_ruby/models/save_referrer_dto.rb +229 -0
  132. data/lib/songtradr_api_client_ruby/models/save_taggrams_dto.rb +574 -0
  133. data/lib/songtradr_api_client_ruby/models/save_user_dto.rb +317 -0
  134. data/lib/songtradr_api_client_ruby/models/search_filter_values_dto.rb +867 -0
  135. data/lib/songtradr_api_client_ruby/models/search_recording_granular_abstraction_dto.rb +270 -0
  136. data/lib/songtradr_api_client_ruby/models/search_recording_granular_dto.rb +235 -0
  137. data/lib/songtradr_api_client_ruby/models/sign_up_dto.rb +262 -0
  138. data/lib/songtradr_api_client_ruby/models/tag_dto.rb +250 -0
  139. data/lib/songtradr_api_client_ruby/models/tag_small_dto.rb +239 -0
  140. data/lib/songtradr_api_client_ruby/models/taggram_dto.rb +271 -0
  141. data/lib/songtradr_api_client_ruby/models/tags_summary_dto.rb +250 -0
  142. data/lib/songtradr_api_client_ruby/models/tagstrength_dto.rb +269 -0
  143. data/lib/songtradr_api_client_ruby/models/title_dto.rb +225 -0
  144. data/lib/songtradr_api_client_ruby/models/token_request.rb +224 -0
  145. data/lib/songtradr_api_client_ruby/models/track_to_medium_product_dto.rb +248 -0
  146. data/lib/songtradr_api_client_ruby/models/update_password_dto.rb +238 -0
  147. data/lib/songtradr_api_client_ruby/models/usage_dto.rb +220 -0
  148. data/lib/songtradr_api_client_ruby/models/user_dto.rb +481 -0
  149. data/lib/songtradr_api_client_ruby/version.rb +15 -0
  150. data/lib/songtradr_api_client_ruby.rb +108 -0
  151. data/openapi-generator-config.yaml +10 -0
  152. data/songtradr_api_client_ruby.gemspec +39 -0
  153. data/spec/api/allowed_values_api_spec.rb +68 -0
  154. data/spec/api/party_api_spec.rb +46 -0
  155. data/spec/api/playlist_api_spec.rb +72 -0
  156. data/spec/api/recording_api_spec.rb +192 -0
  157. data/spec/api/user_api_spec.rb +507 -0
  158. data/spec/api_client_spec.rb +223 -0
  159. data/spec/configuration_spec.rb +82 -0
  160. data/spec/models/category_medium_dto_spec.rb +46 -0
  161. data/spec/models/category_minimal_dto_spec.rb +34 -0
  162. data/spec/models/config_access_dto_spec.rb +48 -0
  163. data/spec/models/config_identifier_dto_spec.rb +40 -0
  164. data/spec/models/contributor_type_dto_spec.rb +34 -0
  165. data/spec/models/error_response_spec.rb +58 -0
  166. data/spec/models/field_summary_dto_spec.rb +46 -0
  167. data/spec/models/file_dto_spec.rb +142 -0
  168. data/spec/models/file_list_dto_spec.rb +52 -0
  169. data/spec/models/file_minimal_with_url_dto_spec.rb +46 -0
  170. data/spec/models/file_small_dto_spec.rb +130 -0
  171. data/spec/models/file_upload_dto_spec.rb +46 -0
  172. data/spec/models/file_w_ith_url_dto_spec.rb +40 -0
  173. data/spec/models/files_summary_dto_spec.rb +70 -0
  174. data/spec/models/forgot_password_dto_spec.rb +44 -0
  175. data/spec/models/genre_dto_spec.rb +40 -0
  176. data/spec/models/genre_minimal_dto_spec.rb +34 -0
  177. data/spec/models/genres_summary_dto_spec.rb +46 -0
  178. data/spec/models/init_put_recording_audio_dto_spec.rb +46 -0
  179. data/spec/models/jwt_token_dto_spec.rb +46 -0
  180. data/spec/models/login_dto_spec.rb +52 -0
  181. data/spec/models/musical_features_dto_spec.rb +706 -0
  182. data/spec/models/p_line_dto_spec.rb +40 -0
  183. data/spec/models/party_large_dto_spec.rb +76 -0
  184. data/spec/models/party_small_dto_spec.rb +40 -0
  185. data/spec/models/playlist_large_dto_spec.rb +98 -0
  186. data/spec/models/product_medium_dto_spec.rb +82 -0
  187. data/spec/models/product_party_dto_spec.rb +40 -0
  188. data/spec/models/recording_for_similarity_search_dto_spec.rb +40 -0
  189. data/spec/models/recording_genre_prediction_dto_spec.rb +46 -0
  190. data/spec/models/recording_large_dto_spec.rb +100 -0
  191. data/spec/models/recording_list_dto_spec.rb +52 -0
  192. data/spec/models/recording_medium_dto_spec.rb +88 -0
  193. data/spec/models/recording_minimal_with_musical_features_dto_spec.rb +40 -0
  194. data/spec/models/recording_minimal_with_taggrams_dto_spec.rb +46 -0
  195. data/spec/models/recording_minimal_with_tagstrengths_dto_spec.rb +40 -0
  196. data/spec/models/recording_party_dto_spec.rb +40 -0
  197. data/spec/models/recording_playlist_dto_spec.rb +52 -0
  198. data/spec/models/recording_small_dto_spec.rb +52 -0
  199. data/spec/models/recording_tag_small_dto_spec.rb +34 -0
  200. data/spec/models/save_file_recording_dto_spec.rb +880 -0
  201. data/spec/models/save_playlist_dto_spec.rb +86 -0
  202. data/spec/models/save_recording_genre_dto_spec.rb +46 -0
  203. data/spec/models/save_recording_party_dto_spec.rb +44 -0
  204. data/spec/models/save_recording_playlist_dto_spec.rb +46 -0
  205. data/spec/models/save_recording_tag_dto_spec.rb +40 -0
  206. data/spec/models/save_referrer_dto_spec.rb +40 -0
  207. data/spec/models/save_taggrams_dto_spec.rb +226 -0
  208. data/spec/models/save_user_dto_spec.rb +72 -0
  209. data/spec/models/search_filter_values_dto_spec.rb +274 -0
  210. data/spec/models/search_recording_granular_abstraction_dto_spec.rb +44 -0
  211. data/spec/models/search_recording_granular_dto_spec.rb +40 -0
  212. data/spec/models/sign_up_dto_spec.rb +52 -0
  213. data/spec/models/tag_dto_spec.rb +46 -0
  214. data/spec/models/tag_small_dto_spec.rb +40 -0
  215. data/spec/models/taggram_dto_spec.rb +58 -0
  216. data/spec/models/tags_summary_dto_spec.rb +46 -0
  217. data/spec/models/tagstrength_dto_spec.rb +58 -0
  218. data/spec/models/title_dto_spec.rb +34 -0
  219. data/spec/models/token_request_spec.rb +34 -0
  220. data/spec/models/track_to_medium_product_dto_spec.rb +46 -0
  221. data/spec/models/update_password_dto_spec.rb +40 -0
  222. data/spec/models/usage_dto_spec.rb +34 -0
  223. data/spec/models/user_dto_spec.rb +148 -0
  224. data/spec/spec_helper.rb +111 -0
  225. metadata +412 -0
data/docs/UserDTO.md ADDED
@@ -0,0 +1,56 @@
1
+ # SongtradrApiClientRuby::UserDTO
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **username** | **String** | | |
8
+ | **email_address** | **String** | | |
9
+ | **company_name** | **String** | | [optional] |
10
+ | **is_admin** | **Boolean** | | |
11
+ | **full_search_allowed** | **Boolean** | | |
12
+ | **voice_search_allowed** | **Boolean** | | |
13
+ | **recording_detail_allowed** | **Boolean** | | |
14
+ | **artist_detail_allowed** | **Boolean** | | |
15
+ | **playlist_prediction_allowed** | **Boolean** | | |
16
+ | **widgets_allowed** | **Boolean** | | |
17
+ | **signup_allowed** | **Boolean** | | |
18
+ | **upload_allowed** | **Boolean** | | |
19
+ | **fingerprint_allowed** | **Boolean** | | |
20
+ | **audiotagging_allowed** | **Boolean** | | |
21
+ | **b2b_allowed** | **Boolean** | | |
22
+ | **editor_allowed** | **Boolean** | | |
23
+ | **reduced_musical_features** | **Boolean** | | |
24
+ | **confirmed** | **Boolean** | | |
25
+ | **language** | **String** | | |
26
+ | **admin** | **Boolean** | | [optional] |
27
+
28
+ ## Example
29
+
30
+ ```ruby
31
+ require 'songtradr_api_client_ruby'
32
+
33
+ instance = SongtradrApiClientRuby::UserDTO.new(
34
+ username: null,
35
+ email_address: null,
36
+ company_name: null,
37
+ is_admin: null,
38
+ full_search_allowed: null,
39
+ voice_search_allowed: null,
40
+ recording_detail_allowed: null,
41
+ artist_detail_allowed: null,
42
+ playlist_prediction_allowed: null,
43
+ widgets_allowed: null,
44
+ signup_allowed: null,
45
+ upload_allowed: null,
46
+ fingerprint_allowed: null,
47
+ audiotagging_allowed: null,
48
+ b2b_allowed: null,
49
+ editor_allowed: null,
50
+ reduced_musical_features: null,
51
+ confirmed: null,
52
+ language: null,
53
+ admin: null
54
+ )
55
+ ```
56
+
data/getspec.rb ADDED
@@ -0,0 +1,10 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "json"
4
+ require 'net/http'
5
+
6
+ api_response = Net::HTTP.get URI(ENV['SONGTRADR_API'])
7
+ json = JSON.parse api_response
8
+ version = json["info"]["version"]
9
+ ruby_gems_response = Net::HTTP.get_response URI("https://rubygems.org/gems/songtradr_api_client_ruby/versions/#{version}")
10
+ puts ruby_gems_response.code == "404" ? version : "0"
data/git_push.sh ADDED
@@ -0,0 +1,57 @@
1
+ #!/bin/sh
2
+ # ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
3
+ #
4
+ # Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com"
5
+
6
+ git_user_id=$1
7
+ git_repo_id=$2
8
+ release_note=$3
9
+ git_host=$4
10
+
11
+ if [ "$git_host" = "" ]; then
12
+ git_host="github.com"
13
+ echo "[INFO] No command line input provided. Set \$git_host to $git_host"
14
+ fi
15
+
16
+ if [ "$git_user_id" = "" ]; then
17
+ git_user_id="GIT_USER_ID"
18
+ echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
19
+ fi
20
+
21
+ if [ "$git_repo_id" = "" ]; then
22
+ git_repo_id="GIT_REPO_ID"
23
+ echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
24
+ fi
25
+
26
+ if [ "$release_note" = "" ]; then
27
+ release_note="Minor update"
28
+ echo "[INFO] No command line input provided. Set \$release_note to $release_note"
29
+ fi
30
+
31
+ # Initialize the local directory as a Git repository
32
+ git init
33
+
34
+ # Adds the files in the local repository and stages them for commit.
35
+ git add .
36
+
37
+ # Commits the tracked changes and prepares them to be pushed to a remote repository.
38
+ git commit -m "$release_note"
39
+
40
+ # Sets the new remote
41
+ git_remote=$(git remote)
42
+ if [ "$git_remote" = "" ]; then # git remote not defined
43
+
44
+ if [ "$GIT_TOKEN" = "" ]; then
45
+ echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
46
+ git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git
47
+ else
48
+ git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git
49
+ fi
50
+
51
+ fi
52
+
53
+ git pull origin master
54
+
55
+ # Pushes (Forces) the changes in the local repository up to the remote repository
56
+ echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git"
57
+ git push origin master 2>&1 | grep -v 'To https'
@@ -0,0 +1,213 @@
1
+ =begin
2
+ #Songtradr API
3
+
4
+ #This is the Songtradr API. Use it to retrieve deep music metadata and trigger processes like auto-tagging. You can also use the API to manage your account and musicube cloud data. **Authentication** 1. Reach out to support@songtradr.com to receive a free account or use your login data if you are already signed up. 2. To authenticate, you need to login via the POST /api/v1/user/login endpoint. 3. The endpoint responds with a jwtToken which you can use in all following API requests as a bearer token. **Rate Limiting** The current limit is 120 Requests per minute. Reach out to us via support@songtradr.com if you need to request more. **Getting Started with auto-tagging** 1. If you want to get your own files auto-tagged, use the POST /api/v1/user/file/{name}/initUpload endpoint. It responds with a presigned S3 link where you can upload your file. 2. You can check the processing status of your file via the GET /api/v1/user/file/{name}/filesStatus endpoint. 3. As soon as processing is done, you can request the generated data via the GET /api/v1/user/files endpoint. **Getting Started with search** You can either search the released music via the /public/recording endpoints or your own private uploaded music via the /user/file/ endpoints. 1. If you want to search the world's released music, a good starting point is the GET /api/v1/public/recording/search endpoint. Please find the extensive list of parameters that serve as semantic search filters. 2. If you want to search your own previously uploaded music, a good starting point is the GET GET /api/v1/user/files endpoint. It has the same extensive list of parameters that serve as semantic search filters.
5
+
6
+ The version of the OpenAPI document: 1.12.21
7
+ Contact: info@songtradr.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 7.0.0-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module SongtradrApiClientRuby
16
+ class AllowedValuesApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Allowed values for music descriptive parameters to be used in the searchAll endpoint.
23
+ # @param [Hash] opts the optional parameters
24
+ # @option opts [String] :response_size Size the response should have. (default to 's')
25
+ # @return [SearchFilterValuesDTO]
26
+ def allowed_musical_features(opts = {})
27
+ data, _status_code, _headers = allowed_musical_features_with_http_info(opts)
28
+ data
29
+ end
30
+
31
+ # Allowed values for music descriptive parameters to be used in the searchAll endpoint.
32
+ # @param [Hash] opts the optional parameters
33
+ # @option opts [String] :response_size Size the response should have. (default to 's')
34
+ # @return [Array<(SearchFilterValuesDTO, Integer, Hash)>] SearchFilterValuesDTO data, response status code and response headers
35
+ def allowed_musical_features_with_http_info(opts = {})
36
+ if @api_client.config.debugging
37
+ @api_client.config.logger.debug 'Calling API: AllowedValuesApi.allowed_musical_features ...'
38
+ end
39
+ allowable_values = ["s", "l"]
40
+ if @api_client.config.client_side_validation && opts[:'response_size'] && !allowable_values.include?(opts[:'response_size'])
41
+ fail ArgumentError, "invalid value for \"response_size\", must be one of #{allowable_values}"
42
+ end
43
+ # resource path
44
+ local_var_path = '/api/v1/allowedValues/musicalFeatures'
45
+
46
+ # query parameters
47
+ query_params = opts[:query_params] || {}
48
+ query_params[:'responseSize'] = opts[:'response_size'] if !opts[:'response_size'].nil?
49
+
50
+ # header parameters
51
+ header_params = opts[:header_params] || {}
52
+ # HTTP header 'Accept' (if needed)
53
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
54
+
55
+ # form parameters
56
+ form_params = opts[:form_params] || {}
57
+
58
+ # http body (model)
59
+ post_body = opts[:debug_body]
60
+
61
+ # return_type
62
+ return_type = opts[:debug_return_type] || 'SearchFilterValuesDTO'
63
+
64
+ # auth_names
65
+ auth_names = opts[:debug_auth_names] || []
66
+
67
+ new_options = opts.merge(
68
+ :operation => :"AllowedValuesApi.allowed_musical_features",
69
+ :header_params => header_params,
70
+ :query_params => query_params,
71
+ :form_params => form_params,
72
+ :body => post_body,
73
+ :auth_names => auth_names,
74
+ :return_type => return_type
75
+ )
76
+
77
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
78
+ if @api_client.config.debugging
79
+ @api_client.config.logger.debug "API called: AllowedValuesApi#allowed_musical_features\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
80
+ end
81
+ return data, status_code, headers
82
+ end
83
+
84
+ # Allowed values for genres.
85
+ # @param genre_type [String] Type of the response should have.
86
+ # @param [Hash] opts the optional parameters
87
+ # @return [Array<GenreDTO>]
88
+ def genres(genre_type, opts = {})
89
+ data, _status_code, _headers = genres_with_http_info(genre_type, opts)
90
+ data
91
+ end
92
+
93
+ # Allowed values for genres.
94
+ # @param genre_type [String] Type of the response should have.
95
+ # @param [Hash] opts the optional parameters
96
+ # @return [Array<(Array<GenreDTO>, Integer, Hash)>] Array<GenreDTO> data, response status code and response headers
97
+ def genres_with_http_info(genre_type, opts = {})
98
+ if @api_client.config.debugging
99
+ @api_client.config.logger.debug 'Calling API: AllowedValuesApi.genres ...'
100
+ end
101
+ # verify the required parameter 'genre_type' is set
102
+ if @api_client.config.client_side_validation && genre_type.nil?
103
+ fail ArgumentError, "Missing the required parameter 'genre_type' when calling AllowedValuesApi.genres"
104
+ end
105
+ # verify enum value
106
+ allowable_values = ["level1Genre", "level2Genre"]
107
+ if @api_client.config.client_side_validation && !allowable_values.include?(genre_type)
108
+ fail ArgumentError, "invalid value for \"genre_type\", must be one of #{allowable_values}"
109
+ end
110
+ # resource path
111
+ local_var_path = '/api/v1/allowedValues/genre'
112
+
113
+ # query parameters
114
+ query_params = opts[:query_params] || {}
115
+ query_params[:'genreType'] = genre_type
116
+
117
+ # header parameters
118
+ header_params = opts[:header_params] || {}
119
+ # HTTP header 'Accept' (if needed)
120
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
121
+
122
+ # form parameters
123
+ form_params = opts[:form_params] || {}
124
+
125
+ # http body (model)
126
+ post_body = opts[:debug_body]
127
+
128
+ # return_type
129
+ return_type = opts[:debug_return_type] || 'Array<GenreDTO>'
130
+
131
+ # auth_names
132
+ auth_names = opts[:debug_auth_names] || []
133
+
134
+ new_options = opts.merge(
135
+ :operation => :"AllowedValuesApi.genres",
136
+ :header_params => header_params,
137
+ :query_params => query_params,
138
+ :form_params => form_params,
139
+ :body => post_body,
140
+ :auth_names => auth_names,
141
+ :return_type => return_type
142
+ )
143
+
144
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
145
+ if @api_client.config.debugging
146
+ @api_client.config.logger.debug "API called: AllowedValuesApi#genres\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
147
+ end
148
+ return data, status_code, headers
149
+ end
150
+
151
+ # All descriptive tags inside of tag-categories.
152
+ # @param [Hash] opts the optional parameters
153
+ # @option opts [String] :category_name Filters tags for one category only
154
+ # @return [Array<CategoryMediumDTO>]
155
+ def tags(opts = {})
156
+ data, _status_code, _headers = tags_with_http_info(opts)
157
+ data
158
+ end
159
+
160
+ # All descriptive tags inside of tag-categories.
161
+ # @param [Hash] opts the optional parameters
162
+ # @option opts [String] :category_name Filters tags for one category only
163
+ # @return [Array<(Array<CategoryMediumDTO>, Integer, Hash)>] Array<CategoryMediumDTO> data, response status code and response headers
164
+ def tags_with_http_info(opts = {})
165
+ if @api_client.config.debugging
166
+ @api_client.config.logger.debug 'Calling API: AllowedValuesApi.tags ...'
167
+ end
168
+ allowable_values = ["mood", "instrument", "soundFeature", "era", "musicalFeature", "originRegion", "effectAndContext", "formation", "form", "vocals", "energy", "soundGeneration", "tempo", "key", "rhythm", "productionMusicMood"]
169
+ if @api_client.config.client_side_validation && opts[:'category_name'] && !allowable_values.include?(opts[:'category_name'])
170
+ fail ArgumentError, "invalid value for \"category_name\", must be one of #{allowable_values}"
171
+ end
172
+ # resource path
173
+ local_var_path = '/api/v1/allowedValues/tag'
174
+
175
+ # query parameters
176
+ query_params = opts[:query_params] || {}
177
+ query_params[:'categoryName'] = opts[:'category_name'] if !opts[:'category_name'].nil?
178
+
179
+ # header parameters
180
+ header_params = opts[:header_params] || {}
181
+ # HTTP header 'Accept' (if needed)
182
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
183
+
184
+ # form parameters
185
+ form_params = opts[:form_params] || {}
186
+
187
+ # http body (model)
188
+ post_body = opts[:debug_body]
189
+
190
+ # return_type
191
+ return_type = opts[:debug_return_type] || 'Array<CategoryMediumDTO>'
192
+
193
+ # auth_names
194
+ auth_names = opts[:debug_auth_names] || []
195
+
196
+ new_options = opts.merge(
197
+ :operation => :"AllowedValuesApi.tags",
198
+ :header_params => header_params,
199
+ :query_params => query_params,
200
+ :form_params => form_params,
201
+ :body => post_body,
202
+ :auth_names => auth_names,
203
+ :return_type => return_type
204
+ )
205
+
206
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
207
+ if @api_client.config.debugging
208
+ @api_client.config.logger.debug "API called: AllowedValuesApi#tags\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
209
+ end
210
+ return data, status_code, headers
211
+ end
212
+ end
213
+ end
@@ -0,0 +1,84 @@
1
+ =begin
2
+ #Songtradr API
3
+
4
+ #This is the Songtradr API. Use it to retrieve deep music metadata and trigger processes like auto-tagging. You can also use the API to manage your account and musicube cloud data. **Authentication** 1. Reach out to support@songtradr.com to receive a free account or use your login data if you are already signed up. 2. To authenticate, you need to login via the POST /api/v1/user/login endpoint. 3. The endpoint responds with a jwtToken which you can use in all following API requests as a bearer token. **Rate Limiting** The current limit is 120 Requests per minute. Reach out to us via support@songtradr.com if you need to request more. **Getting Started with auto-tagging** 1. If you want to get your own files auto-tagged, use the POST /api/v1/user/file/{name}/initUpload endpoint. It responds with a presigned S3 link where you can upload your file. 2. You can check the processing status of your file via the GET /api/v1/user/file/{name}/filesStatus endpoint. 3. As soon as processing is done, you can request the generated data via the GET /api/v1/user/files endpoint. **Getting Started with search** You can either search the released music via the /public/recording endpoints or your own private uploaded music via the /user/file/ endpoints. 1. If you want to search the world's released music, a good starting point is the GET /api/v1/public/recording/search endpoint. Please find the extensive list of parameters that serve as semantic search filters. 2. If you want to search your own previously uploaded music, a good starting point is the GET GET /api/v1/user/files endpoint. It has the same extensive list of parameters that serve as semantic search filters.
5
+
6
+ The version of the OpenAPI document: 1.12.21
7
+ Contact: info@songtradr.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 7.0.0-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module SongtradrApiClientRuby
16
+ class PartyApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Information on a person, group or company.
23
+ # @param full_name [String] Full Name of the person, group, company or organisation.
24
+ # @param [Hash] opts the optional parameters
25
+ # @return [PartyLargeDTO]
26
+ def party(full_name, opts = {})
27
+ data, _status_code, _headers = party_with_http_info(full_name, opts)
28
+ data
29
+ end
30
+
31
+ # Information on a person, group or company.
32
+ # @param full_name [String] Full Name of the person, group, company or organisation.
33
+ # @param [Hash] opts the optional parameters
34
+ # @return [Array<(PartyLargeDTO, Integer, Hash)>] PartyLargeDTO data, response status code and response headers
35
+ def party_with_http_info(full_name, opts = {})
36
+ if @api_client.config.debugging
37
+ @api_client.config.logger.debug 'Calling API: PartyApi.party ...'
38
+ end
39
+ # verify the required parameter 'full_name' is set
40
+ if @api_client.config.client_side_validation && full_name.nil?
41
+ fail ArgumentError, "Missing the required parameter 'full_name' when calling PartyApi.party"
42
+ end
43
+ # resource path
44
+ local_var_path = '/api/v1/party'
45
+
46
+ # query parameters
47
+ query_params = opts[:query_params] || {}
48
+ query_params[:'fullName'] = full_name
49
+
50
+ # header parameters
51
+ header_params = opts[:header_params] || {}
52
+ # HTTP header 'Accept' (if needed)
53
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
54
+
55
+ # form parameters
56
+ form_params = opts[:form_params] || {}
57
+
58
+ # http body (model)
59
+ post_body = opts[:debug_body]
60
+
61
+ # return_type
62
+ return_type = opts[:debug_return_type] || 'PartyLargeDTO'
63
+
64
+ # auth_names
65
+ auth_names = opts[:debug_auth_names] || ['bearer-jwt']
66
+
67
+ new_options = opts.merge(
68
+ :operation => :"PartyApi.party",
69
+ :header_params => header_params,
70
+ :query_params => query_params,
71
+ :form_params => form_params,
72
+ :body => post_body,
73
+ :auth_names => auth_names,
74
+ :return_type => return_type
75
+ )
76
+
77
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
78
+ if @api_client.config.debugging
79
+ @api_client.config.logger.debug "API called: PartyApi#party\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
80
+ end
81
+ return data, status_code, headers
82
+ end
83
+ end
84
+ end
@@ -0,0 +1,222 @@
1
+ =begin
2
+ #Songtradr API
3
+
4
+ #This is the Songtradr API. Use it to retrieve deep music metadata and trigger processes like auto-tagging. You can also use the API to manage your account and musicube cloud data. **Authentication** 1. Reach out to support@songtradr.com to receive a free account or use your login data if you are already signed up. 2. To authenticate, you need to login via the POST /api/v1/user/login endpoint. 3. The endpoint responds with a jwtToken which you can use in all following API requests as a bearer token. **Rate Limiting** The current limit is 120 Requests per minute. Reach out to us via support@songtradr.com if you need to request more. **Getting Started with auto-tagging** 1. If you want to get your own files auto-tagged, use the POST /api/v1/user/file/{name}/initUpload endpoint. It responds with a presigned S3 link where you can upload your file. 2. You can check the processing status of your file via the GET /api/v1/user/file/{name}/filesStatus endpoint. 3. As soon as processing is done, you can request the generated data via the GET /api/v1/user/files endpoint. **Getting Started with search** You can either search the released music via the /public/recording endpoints or your own private uploaded music via the /user/file/ endpoints. 1. If you want to search the world's released music, a good starting point is the GET /api/v1/public/recording/search endpoint. Please find the extensive list of parameters that serve as semantic search filters. 2. If you want to search your own previously uploaded music, a good starting point is the GET GET /api/v1/user/files endpoint. It has the same extensive list of parameters that serve as semantic search filters.
5
+
6
+ The version of the OpenAPI document: 1.12.21
7
+ Contact: info@songtradr.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 7.0.0-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module SongtradrApiClientRuby
16
+ class PlaylistApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # All playlists.
23
+ # @param [Hash] opts the optional parameters
24
+ # @option opts [Boolean] :include_recordings Whether a playlist shall include recordings or not. (default to false)
25
+ # @option opts [Boolean] :ignore_usages Whether a playlist shall include all songs regardless of their track usages. (default to false)
26
+ # @option opts [String] :usage_filter_mode Whether a playlist recordings shall include all playlist usages or not. (default to 'any')
27
+ # @option opts [String] :songtradr_playlist_guid
28
+ # @return [Array<PlaylistLargeDTO>]
29
+ def all_playlists(opts = {})
30
+ data, _status_code, _headers = all_playlists_with_http_info(opts)
31
+ data
32
+ end
33
+
34
+ # All playlists.
35
+ # @param [Hash] opts the optional parameters
36
+ # @option opts [Boolean] :include_recordings Whether a playlist shall include recordings or not. (default to false)
37
+ # @option opts [Boolean] :ignore_usages Whether a playlist shall include all songs regardless of their track usages. (default to false)
38
+ # @option opts [String] :usage_filter_mode Whether a playlist recordings shall include all playlist usages or not. (default to 'any')
39
+ # @option opts [String] :songtradr_playlist_guid
40
+ # @return [Array<(Array<PlaylistLargeDTO>, Integer, Hash)>] Array<PlaylistLargeDTO> data, response status code and response headers
41
+ def all_playlists_with_http_info(opts = {})
42
+ if @api_client.config.debugging
43
+ @api_client.config.logger.debug 'Calling API: PlaylistApi.all_playlists ...'
44
+ end
45
+ allowable_values = ["any", "all"]
46
+ if @api_client.config.client_side_validation && opts[:'usage_filter_mode'] && !allowable_values.include?(opts[:'usage_filter_mode'])
47
+ fail ArgumentError, "invalid value for \"usage_filter_mode\", must be one of #{allowable_values}"
48
+ end
49
+ # resource path
50
+ local_var_path = '/api/v1/playlist'
51
+
52
+ # query parameters
53
+ query_params = opts[:query_params] || {}
54
+ query_params[:'includeRecordings'] = opts[:'include_recordings'] if !opts[:'include_recordings'].nil?
55
+ query_params[:'ignoreUsages'] = opts[:'ignore_usages'] if !opts[:'ignore_usages'].nil?
56
+ query_params[:'usageFilterMode'] = opts[:'usage_filter_mode'] if !opts[:'usage_filter_mode'].nil?
57
+ query_params[:'songtradrPlaylistGuid'] = opts[:'songtradr_playlist_guid'] if !opts[:'songtradr_playlist_guid'].nil?
58
+
59
+ # header parameters
60
+ header_params = opts[:header_params] || {}
61
+ # HTTP header 'Accept' (if needed)
62
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
63
+
64
+ # form parameters
65
+ form_params = opts[:form_params] || {}
66
+
67
+ # http body (model)
68
+ post_body = opts[:debug_body]
69
+
70
+ # return_type
71
+ return_type = opts[:debug_return_type] || 'Array<PlaylistLargeDTO>'
72
+
73
+ # auth_names
74
+ auth_names = opts[:debug_auth_names] || ['bearer-jwt']
75
+
76
+ new_options = opts.merge(
77
+ :operation => :"PlaylistApi.all_playlists",
78
+ :header_params => header_params,
79
+ :query_params => query_params,
80
+ :form_params => form_params,
81
+ :body => post_body,
82
+ :auth_names => auth_names,
83
+ :return_type => return_type
84
+ )
85
+
86
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
87
+ if @api_client.config.debugging
88
+ @api_client.config.logger.debug "API called: PlaylistApi#all_playlists\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
89
+ end
90
+ return data, status_code, headers
91
+ end
92
+
93
+ # Create and edit playlist.
94
+ # This endpoint expects always the full amount of information including all recordings.
95
+ # @param save_playlist_dto [SavePlaylistDTO]
96
+ # @param [Hash] opts the optional parameters
97
+ # @return [Object]
98
+ def create_or_update_playlist(save_playlist_dto, opts = {})
99
+ data, _status_code, _headers = create_or_update_playlist_with_http_info(save_playlist_dto, opts)
100
+ data
101
+ end
102
+
103
+ # Create and edit playlist.
104
+ # This endpoint expects always the full amount of information including all recordings.
105
+ # @param save_playlist_dto [SavePlaylistDTO]
106
+ # @param [Hash] opts the optional parameters
107
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
108
+ def create_or_update_playlist_with_http_info(save_playlist_dto, opts = {})
109
+ if @api_client.config.debugging
110
+ @api_client.config.logger.debug 'Calling API: PlaylistApi.create_or_update_playlist ...'
111
+ end
112
+ # verify the required parameter 'save_playlist_dto' is set
113
+ if @api_client.config.client_side_validation && save_playlist_dto.nil?
114
+ fail ArgumentError, "Missing the required parameter 'save_playlist_dto' when calling PlaylistApi.create_or_update_playlist"
115
+ end
116
+ # resource path
117
+ local_var_path = '/api/v1/playlist'
118
+
119
+ # query parameters
120
+ query_params = opts[:query_params] || {}
121
+
122
+ # header parameters
123
+ header_params = opts[:header_params] || {}
124
+ # HTTP header 'Accept' (if needed)
125
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
126
+ # HTTP header 'Content-Type'
127
+ content_type = @api_client.select_header_content_type(['application/json'])
128
+ if !content_type.nil?
129
+ header_params['Content-Type'] = content_type
130
+ end
131
+
132
+ # form parameters
133
+ form_params = opts[:form_params] || {}
134
+
135
+ # http body (model)
136
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(save_playlist_dto)
137
+
138
+ # return_type
139
+ return_type = opts[:debug_return_type] || 'Object'
140
+
141
+ # auth_names
142
+ auth_names = opts[:debug_auth_names] || ['bearer-jwt']
143
+
144
+ new_options = opts.merge(
145
+ :operation => :"PlaylistApi.create_or_update_playlist",
146
+ :header_params => header_params,
147
+ :query_params => query_params,
148
+ :form_params => form_params,
149
+ :body => post_body,
150
+ :auth_names => auth_names,
151
+ :return_type => return_type
152
+ )
153
+
154
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
155
+ if @api_client.config.debugging
156
+ @api_client.config.logger.debug "API called: PlaylistApi#create_or_update_playlist\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
157
+ end
158
+ return data, status_code, headers
159
+ end
160
+
161
+ # Delete playlist.
162
+ # @param songtradr_playlist_guid [String] ID of the file that should be deleted.
163
+ # @param [Hash] opts the optional parameters
164
+ # @return [Object]
165
+ def delete_playlist(songtradr_playlist_guid, opts = {})
166
+ data, _status_code, _headers = delete_playlist_with_http_info(songtradr_playlist_guid, opts)
167
+ data
168
+ end
169
+
170
+ # Delete playlist.
171
+ # @param songtradr_playlist_guid [String] ID of the file that should be deleted.
172
+ # @param [Hash] opts the optional parameters
173
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
174
+ def delete_playlist_with_http_info(songtradr_playlist_guid, opts = {})
175
+ if @api_client.config.debugging
176
+ @api_client.config.logger.debug 'Calling API: PlaylistApi.delete_playlist ...'
177
+ end
178
+ # verify the required parameter 'songtradr_playlist_guid' is set
179
+ if @api_client.config.client_side_validation && songtradr_playlist_guid.nil?
180
+ fail ArgumentError, "Missing the required parameter 'songtradr_playlist_guid' when calling PlaylistApi.delete_playlist"
181
+ end
182
+ # resource path
183
+ local_var_path = '/api/v1/playlist/{songtradrPlaylistGuid}'.sub('{' + 'songtradrPlaylistGuid' + '}', CGI.escape(songtradr_playlist_guid.to_s))
184
+
185
+ # query parameters
186
+ query_params = opts[:query_params] || {}
187
+
188
+ # header parameters
189
+ header_params = opts[:header_params] || {}
190
+ # HTTP header 'Accept' (if needed)
191
+ header_params['Accept'] = @api_client.select_header_accept(['application/hal+json', 'application/json'])
192
+
193
+ # form parameters
194
+ form_params = opts[:form_params] || {}
195
+
196
+ # http body (model)
197
+ post_body = opts[:debug_body]
198
+
199
+ # return_type
200
+ return_type = opts[:debug_return_type] || 'Object'
201
+
202
+ # auth_names
203
+ auth_names = opts[:debug_auth_names] || ['bearer-jwt']
204
+
205
+ new_options = opts.merge(
206
+ :operation => :"PlaylistApi.delete_playlist",
207
+ :header_params => header_params,
208
+ :query_params => query_params,
209
+ :form_params => form_params,
210
+ :body => post_body,
211
+ :auth_names => auth_names,
212
+ :return_type => return_type
213
+ )
214
+
215
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
216
+ if @api_client.config.debugging
217
+ @api_client.config.logger.debug "API called: PlaylistApi#delete_playlist\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
218
+ end
219
+ return data, status_code, headers
220
+ end
221
+ end
222
+ end