songtradr_api_client_ruby 1.17.0 → 1.18.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (133) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +24 -22
  3. data/README.md +7 -9
  4. data/docs/CategoryMediumDTO.md +3 -3
  5. data/docs/MusicalFeaturesDTO.md +97 -93
  6. data/docs/RecordingApi.md +71 -1
  7. data/docs/RecordingMediumDTO.md +4 -4
  8. data/docs/RecordingMinimalWithMusicalFeaturesDTO.md +3 -3
  9. data/docs/RecordingPartyDTO.md +3 -3
  10. data/docs/RecordingSmallDTO.md +2 -2
  11. data/docs/SearchFilterValuesDTO.md +2 -0
  12. data/docs/UserApi.md +67 -187
  13. data/docs/UserDTO.md +2 -0
  14. data/lib/songtradr_api_client_ruby/api/allowed_values_api.rb +2 -2
  15. data/lib/songtradr_api_client_ruby/api/recording_api.rb +74 -5
  16. data/lib/songtradr_api_client_ruby/api/user_api.rb +86 -403
  17. data/lib/songtradr_api_client_ruby/api_client.rb +5 -4
  18. data/lib/songtradr_api_client_ruby/api_error.rb +2 -2
  19. data/lib/songtradr_api_client_ruby/configuration.rb +2 -2
  20. data/lib/songtradr_api_client_ruby/models/category_medium_dto.rb +17 -17
  21. data/lib/songtradr_api_client_ruby/models/category_minimal_dto.rb +2 -2
  22. data/lib/songtradr_api_client_ruby/models/config_access_dto.rb +2 -2
  23. data/lib/songtradr_api_client_ruby/models/config_identifier_dto.rb +2 -2
  24. data/lib/songtradr_api_client_ruby/models/contributor_type_dto.rb +2 -2
  25. data/lib/songtradr_api_client_ruby/models/error_response.rb +2 -2
  26. data/lib/songtradr_api_client_ruby/models/field_summary_dto.rb +2 -2
  27. data/lib/songtradr_api_client_ruby/models/file_dto.rb +2 -2
  28. data/lib/songtradr_api_client_ruby/models/file_list_dto.rb +2 -2
  29. data/lib/songtradr_api_client_ruby/models/file_small_dto.rb +2 -2
  30. data/lib/songtradr_api_client_ruby/models/file_upload_dto.rb +2 -2
  31. data/lib/songtradr_api_client_ruby/models/file_w_ith_url_dto.rb +2 -2
  32. data/lib/songtradr_api_client_ruby/models/files_summary_dto.rb +2 -2
  33. data/lib/songtradr_api_client_ruby/models/forgot_password_dto.rb +2 -2
  34. data/lib/songtradr_api_client_ruby/models/genre_dto.rb +2 -2
  35. data/lib/songtradr_api_client_ruby/models/genre_minimal_dto.rb +2 -2
  36. data/lib/songtradr_api_client_ruby/models/genres_summary_dto.rb +2 -2
  37. data/lib/songtradr_api_client_ruby/models/image_recognition_response.rb +2 -2
  38. data/lib/songtradr_api_client_ruby/models/init_put_recording_audio_dto.rb +2 -2
  39. data/lib/songtradr_api_client_ruby/models/jwt_token_dto.rb +2 -2
  40. data/lib/songtradr_api_client_ruby/models/login_dto.rb +2 -2
  41. data/lib/songtradr_api_client_ruby/models/musical_features_dto.rb +610 -579
  42. data/lib/songtradr_api_client_ruby/models/party_small_dto.rb +2 -2
  43. data/lib/songtradr_api_client_ruby/models/recording_for_similarity_search_dto.rb +2 -2
  44. data/lib/songtradr_api_client_ruby/models/recording_genre_prediction_dto.rb +2 -2
  45. data/lib/songtradr_api_client_ruby/models/recording_list_dto.rb +2 -2
  46. data/lib/songtradr_api_client_ruby/models/recording_medium_dto.rb +32 -32
  47. data/lib/songtradr_api_client_ruby/models/recording_minimal_with_musical_features_dto.rb +17 -17
  48. data/lib/songtradr_api_client_ruby/models/recording_minimal_with_taggrams_dto.rb +2 -2
  49. data/lib/songtradr_api_client_ruby/models/recording_minimal_with_tagstrengths_dto.rb +2 -2
  50. data/lib/songtradr_api_client_ruby/models/recording_party_dto.rb +17 -17
  51. data/lib/songtradr_api_client_ruby/models/recording_small_dto.rb +14 -14
  52. data/lib/songtradr_api_client_ruby/models/recording_tag_small_dto.rb +2 -2
  53. data/lib/songtradr_api_client_ruby/models/save_user_dto.rb +2 -2
  54. data/lib/songtradr_api_client_ruby/models/search_filter_values_dto.rb +21 -3
  55. data/lib/songtradr_api_client_ruby/models/search_recording_granular_dto.rb +2 -2
  56. data/lib/songtradr_api_client_ruby/models/sign_up_dto.rb +2 -2
  57. data/lib/songtradr_api_client_ruby/models/tag_dto.rb +2 -2
  58. data/lib/songtradr_api_client_ruby/models/tag_small_dto.rb +2 -2
  59. data/lib/songtradr_api_client_ruby/models/taggram_dto.rb +2 -2
  60. data/lib/songtradr_api_client_ruby/models/tags_summary_dto.rb +2 -2
  61. data/lib/songtradr_api_client_ruby/models/tagstrength_dto.rb +2 -2
  62. data/lib/songtradr_api_client_ruby/models/title_dto.rb +2 -2
  63. data/lib/songtradr_api_client_ruby/models/token_request.rb +2 -2
  64. data/lib/songtradr_api_client_ruby/models/track_dto.rb +2 -2
  65. data/lib/songtradr_api_client_ruby/models/update_password_dto.rb +2 -2
  66. data/lib/songtradr_api_client_ruby/models/user_dto.rb +19 -3
  67. data/lib/songtradr_api_client_ruby/models/video_recognition_response.rb +2 -2
  68. data/lib/songtradr_api_client_ruby/version.rb +3 -3
  69. data/lib/songtradr_api_client_ruby.rb +2 -5
  70. data/openapi-generator-config.yaml +1 -1
  71. data/songtradr_api_client_ruby.gemspec +3 -2
  72. data/spec/api/allowed_values_api_spec.rb +2 -2
  73. data/spec/api/recording_api_spec.rb +14 -2
  74. data/spec/api/user_api_spec.rb +15 -74
  75. data/spec/models/category_medium_dto_spec.rb +4 -4
  76. data/spec/models/category_minimal_dto_spec.rb +2 -2
  77. data/spec/models/config_access_dto_spec.rb +2 -2
  78. data/spec/models/config_identifier_dto_spec.rb +2 -2
  79. data/spec/models/contributor_type_dto_spec.rb +2 -2
  80. data/spec/models/error_response_spec.rb +2 -2
  81. data/spec/models/field_summary_dto_spec.rb +2 -2
  82. data/spec/models/file_dto_spec.rb +2 -2
  83. data/spec/models/file_list_dto_spec.rb +2 -2
  84. data/spec/models/file_small_dto_spec.rb +2 -2
  85. data/spec/models/file_upload_dto_spec.rb +2 -2
  86. data/spec/models/file_w_ith_url_dto_spec.rb +2 -2
  87. data/spec/models/files_summary_dto_spec.rb +2 -2
  88. data/spec/models/forgot_password_dto_spec.rb +2 -2
  89. data/spec/models/genre_dto_spec.rb +2 -2
  90. data/spec/models/genre_minimal_dto_spec.rb +2 -2
  91. data/spec/models/genres_summary_dto_spec.rb +2 -2
  92. data/spec/models/image_recognition_response_spec.rb +2 -2
  93. data/spec/models/init_put_recording_audio_dto_spec.rb +2 -2
  94. data/spec/models/jwt_token_dto_spec.rb +2 -2
  95. data/spec/models/login_dto_spec.rb +2 -2
  96. data/spec/models/musical_features_dto_spec.rb +204 -188
  97. data/spec/models/party_small_dto_spec.rb +2 -2
  98. data/spec/models/recording_for_similarity_search_dto_spec.rb +2 -2
  99. data/spec/models/recording_genre_prediction_dto_spec.rb +2 -2
  100. data/spec/models/recording_list_dto_spec.rb +2 -2
  101. data/spec/models/recording_medium_dto_spec.rb +5 -5
  102. data/spec/models/recording_minimal_with_musical_features_dto_spec.rb +4 -4
  103. data/spec/models/recording_minimal_with_taggrams_dto_spec.rb +2 -2
  104. data/spec/models/recording_minimal_with_tagstrengths_dto_spec.rb +2 -2
  105. data/spec/models/recording_party_dto_spec.rb +4 -4
  106. data/spec/models/recording_small_dto_spec.rb +5 -5
  107. data/spec/models/recording_tag_small_dto_spec.rb +2 -2
  108. data/spec/models/save_user_dto_spec.rb +2 -2
  109. data/spec/models/search_filter_values_dto_spec.rb +8 -2
  110. data/spec/models/search_recording_granular_dto_spec.rb +2 -2
  111. data/spec/models/sign_up_dto_spec.rb +2 -2
  112. data/spec/models/tag_dto_spec.rb +2 -2
  113. data/spec/models/tag_small_dto_spec.rb +2 -2
  114. data/spec/models/taggram_dto_spec.rb +2 -2
  115. data/spec/models/tags_summary_dto_spec.rb +2 -2
  116. data/spec/models/tagstrength_dto_spec.rb +2 -2
  117. data/spec/models/title_dto_spec.rb +2 -2
  118. data/spec/models/token_request_spec.rb +2 -2
  119. data/spec/models/track_dto_spec.rb +2 -2
  120. data/spec/models/update_password_dto_spec.rb +2 -2
  121. data/spec/models/user_dto_spec.rb +8 -2
  122. data/spec/models/video_recognition_response_spec.rb +2 -2
  123. data/spec/spec_helper.rb +2 -2
  124. metadata +56 -54
  125. data/docs/CuratePlaylistDTO.md +0 -26
  126. data/docs/CuratePlaylistResponseDTO.md +0 -18
  127. data/docs/PlaylistApi.md +0 -77
  128. data/lib/songtradr_api_client_ruby/api/playlist_api.rb +0 -99
  129. data/lib/songtradr_api_client_ruby/models/curate_playlist_dto.rb +0 -256
  130. data/lib/songtradr_api_client_ruby/models/curate_playlist_response_dto.rb +0 -216
  131. data/spec/api/playlist_api_spec.rb +0 -47
  132. data/spec/models/curate_playlist_dto_spec.rb +0 -60
  133. data/spec/models/curate_playlist_response_dto_spec.rb +0 -36
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: songtradr_api_client_ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.17.0
4
+ version: 1.18.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - songtradr
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-01-08 00:00:00.000000000 Z
11
+ date: 2024-02-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -44,6 +44,20 @@ dependencies:
44
44
  - - ">="
45
45
  - !ruby/object:Gem::Version
46
46
  version: '0'
47
+ - !ruby/object:Gem::Dependency
48
+ name: ruby-filemagic
49
+ requirement: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - ">="
52
+ - !ruby/object:Gem::Version
53
+ version: '0'
54
+ type: :runtime
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ requirements:
58
+ - - ">="
59
+ - !ruby/object:Gem::Version
60
+ version: '0'
47
61
  - !ruby/object:Gem::Dependency
48
62
  name: rspec
49
63
  requirement: !ruby/object:Gem::Requirement
@@ -81,8 +95,6 @@ files:
81
95
  - docs/ConfigAccessDTO.md
82
96
  - docs/ConfigIdentifierDTO.md
83
97
  - docs/ContributorTypeDTO.md
84
- - docs/CuratePlaylistDTO.md
85
- - docs/CuratePlaylistResponseDTO.md
86
98
  - docs/ErrorResponse.md
87
99
  - docs/FieldSummaryDTO.md
88
100
  - docs/FileDTO.md
@@ -101,7 +113,6 @@ files:
101
113
  - docs/LoginDTO.md
102
114
  - docs/MusicalFeaturesDTO.md
103
115
  - docs/PartySmallDTO.md
104
- - docs/PlaylistApi.md
105
116
  - docs/RecordingApi.md
106
117
  - docs/RecordingForSimilaritySearchDTO.md
107
118
  - docs/RecordingGenrePredictionDTO.md
@@ -133,7 +144,6 @@ files:
133
144
  - git_push.sh
134
145
  - lib/songtradr_api_client_ruby.rb
135
146
  - lib/songtradr_api_client_ruby/api/allowed_values_api.rb
136
- - lib/songtradr_api_client_ruby/api/playlist_api.rb
137
147
  - lib/songtradr_api_client_ruby/api/recording_api.rb
138
148
  - lib/songtradr_api_client_ruby/api/user_api.rb
139
149
  - lib/songtradr_api_client_ruby/api_client.rb
@@ -144,8 +154,6 @@ files:
144
154
  - lib/songtradr_api_client_ruby/models/config_access_dto.rb
145
155
  - lib/songtradr_api_client_ruby/models/config_identifier_dto.rb
146
156
  - lib/songtradr_api_client_ruby/models/contributor_type_dto.rb
147
- - lib/songtradr_api_client_ruby/models/curate_playlist_dto.rb
148
- - lib/songtradr_api_client_ruby/models/curate_playlist_response_dto.rb
149
157
  - lib/songtradr_api_client_ruby/models/error_response.rb
150
158
  - lib/songtradr_api_client_ruby/models/field_summary_dto.rb
151
159
  - lib/songtradr_api_client_ruby/models/file_dto.rb
@@ -193,7 +201,6 @@ files:
193
201
  - openapi-generator-config.yaml
194
202
  - songtradr_api_client_ruby.gemspec
195
203
  - spec/api/allowed_values_api_spec.rb
196
- - spec/api/playlist_api_spec.rb
197
204
  - spec/api/recording_api_spec.rb
198
205
  - spec/api/user_api_spec.rb
199
206
  - spec/models/category_medium_dto_spec.rb
@@ -201,8 +208,6 @@ files:
201
208
  - spec/models/config_access_dto_spec.rb
202
209
  - spec/models/config_identifier_dto_spec.rb
203
210
  - spec/models/contributor_type_dto_spec.rb
204
- - spec/models/curate_playlist_dto_spec.rb
205
- - spec/models/curate_playlist_response_dto_spec.rb
206
211
  - spec/models/error_response_spec.rb
207
212
  - spec/models/field_summary_dto_spec.rb
208
213
  - spec/models/file_dto_spec.rb
@@ -271,58 +276,55 @@ signing_key:
271
276
  specification_version: 4
272
277
  summary: Client for Songtradr API, generated with openapi-generator
273
278
  test_files:
274
- - spec/api/allowed_values_api_spec.rb
275
- - spec/api/user_api_spec.rb
276
- - spec/api/playlist_api_spec.rb
277
279
  - spec/api/recording_api_spec.rb
278
- - spec/models/recording_genre_prediction_dto_spec.rb
279
- - spec/models/update_password_dto_spec.rb
280
- - spec/models/recording_minimal_with_musical_features_dto_spec.rb
281
- - spec/models/user_dto_spec.rb
282
- - spec/models/recording_minimal_with_taggrams_dto_spec.rb
280
+ - spec/api/user_api_spec.rb
281
+ - spec/api/allowed_values_api_spec.rb
282
+ - spec/models/genre_dto_spec.rb
283
+ - spec/models/file_dto_spec.rb
284
+ - spec/models/file_upload_dto_spec.rb
285
+ - spec/models/forgot_password_dto_spec.rb
286
+ - spec/models/search_filter_values_dto_spec.rb
283
287
  - spec/models/save_user_dto_spec.rb
284
- - spec/models/genre_minimal_dto_spec.rb
285
- - spec/models/search_recording_granular_dto_spec.rb
286
- - spec/models/file_small_dto_spec.rb
287
- - spec/models/jwt_token_dto_spec.rb
288
- - spec/models/recording_party_dto_spec.rb
289
- - spec/models/recording_medium_dto_spec.rb
290
- - spec/models/video_recognition_response_spec.rb
291
- - spec/models/curate_playlist_response_dto_spec.rb
288
+ - spec/models/image_recognition_response_spec.rb
289
+ - spec/models/field_summary_dto_spec.rb
290
+ - spec/models/recording_minimal_with_musical_features_dto_spec.rb
291
+ - spec/models/token_request_spec.rb
292
+ - spec/models/recording_for_similarity_search_dto_spec.rb
293
+ - spec/models/recording_list_dto_spec.rb
292
294
  - spec/models/musical_features_dto_spec.rb
293
- - spec/models/recording_small_dto_spec.rb
294
- - spec/models/category_medium_dto_spec.rb
295
+ - spec/models/config_access_dto_spec.rb
295
296
  - spec/models/file_list_dto_spec.rb
296
- - spec/models/file_dto_spec.rb
297
- - spec/models/files_summary_dto_spec.rb
298
- - spec/models/config_identifier_dto_spec.rb
297
+ - spec/models/tag_dto_spec.rb
299
298
  - spec/models/error_response_spec.rb
300
- - spec/models/genres_summary_dto_spec.rb
299
+ - spec/models/files_summary_dto_spec.rb
301
300
  - spec/models/tags_summary_dto_spec.rb
301
+ - spec/models/genre_minimal_dto_spec.rb
302
+ - spec/models/category_medium_dto_spec.rb
303
+ - spec/models/search_recording_granular_dto_spec.rb
304
+ - spec/models/contributor_type_dto_spec.rb
305
+ - spec/models/party_small_dto_spec.rb
306
+ - spec/models/category_minimal_dto_spec.rb
307
+ - spec/models/file_small_dto_spec.rb
308
+ - spec/models/genres_summary_dto_spec.rb
309
+ - spec/models/sign_up_dto_spec.rb
302
310
  - spec/models/taggram_dto_spec.rb
311
+ - spec/models/recording_genre_prediction_dto_spec.rb
312
+ - spec/models/tag_small_dto_spec.rb
313
+ - spec/models/recording_tag_small_dto_spec.rb
314
+ - spec/models/recording_minimal_with_tagstrengths_dto_spec.rb
315
+ - spec/models/recording_small_dto_spec.rb
316
+ - spec/models/track_dto_spec.rb
317
+ - spec/models/recording_medium_dto_spec.rb
318
+ - spec/models/login_dto_spec.rb
319
+ - spec/models/update_password_dto_spec.rb
303
320
  - spec/models/init_put_recording_audio_dto_spec.rb
304
- - spec/models/token_request_spec.rb
305
- - spec/models/image_recognition_response_spec.rb
321
+ - spec/models/user_dto_spec.rb
306
322
  - spec/models/tagstrength_dto_spec.rb
307
- - spec/models/sign_up_dto_spec.rb
308
- - spec/models/config_access_dto_spec.rb
309
- - spec/models/party_small_dto_spec.rb
310
- - spec/models/login_dto_spec.rb
311
- - spec/models/contributor_type_dto_spec.rb
312
- - spec/models/curate_playlist_dto_spec.rb
313
- - spec/models/recording_for_similarity_search_dto_spec.rb
314
- - spec/models/file_upload_dto_spec.rb
315
- - spec/models/recording_list_dto_spec.rb
316
- - spec/models/tag_dto_spec.rb
317
- - spec/models/recording_minimal_with_tagstrengths_dto_spec.rb
318
323
  - spec/models/file_w_ith_url_dto_spec.rb
319
- - spec/models/forgot_password_dto_spec.rb
320
- - spec/models/genre_dto_spec.rb
321
- - spec/models/recording_tag_small_dto_spec.rb
322
324
  - spec/models/title_dto_spec.rb
323
- - spec/models/field_summary_dto_spec.rb
324
- - spec/models/tag_small_dto_spec.rb
325
- - spec/models/category_minimal_dto_spec.rb
326
- - spec/models/search_filter_values_dto_spec.rb
327
- - spec/models/track_dto_spec.rb
325
+ - spec/models/recording_party_dto_spec.rb
326
+ - spec/models/jwt_token_dto_spec.rb
327
+ - spec/models/config_identifier_dto_spec.rb
328
+ - spec/models/video_recognition_response_spec.rb
329
+ - spec/models/recording_minimal_with_taggrams_dto_spec.rb
328
330
  - spec/spec_helper.rb
@@ -1,26 +0,0 @@
1
- # SongtradrApiClientRuby::CuratePlaylistDTO
2
-
3
- ## Properties
4
-
5
- | Name | Type | Description | Notes |
6
- | ---- | ---- | ----------- | ----- |
7
- | **request_data** | **Array<String>** | | [optional] |
8
- | **usage_filter** | **String** | | [optional] |
9
- | **numerical_filter** | **Hash<String, String>** | | [optional] |
10
- | **category_filter** | **Hash<String, String>** | | [optional] |
11
- | **first_id** | **String** | | [optional] |
12
-
13
- ## Example
14
-
15
- ```ruby
16
- require 'songtradr_api_client_ruby'
17
-
18
- instance = SongtradrApiClientRuby::CuratePlaylistDTO.new(
19
- request_data: null,
20
- usage_filter: null,
21
- numerical_filter: null,
22
- category_filter: null,
23
- first_id: null
24
- )
25
- ```
26
-
@@ -1,18 +0,0 @@
1
- # SongtradrApiClientRuby::CuratePlaylistResponseDTO
2
-
3
- ## Properties
4
-
5
- | Name | Type | Description | Notes |
6
- | ---- | ---- | ----------- | ----- |
7
- | **songtradr_track_ids** | **Array<String>** | | [optional] |
8
-
9
- ## Example
10
-
11
- ```ruby
12
- require 'songtradr_api_client_ruby'
13
-
14
- instance = SongtradrApiClientRuby::CuratePlaylistResponseDTO.new(
15
- songtradr_track_ids: null
16
- )
17
- ```
18
-
data/docs/PlaylistApi.md DELETED
@@ -1,77 +0,0 @@
1
- # SongtradrApiClientRuby::PlaylistApi
2
-
3
- All URIs are relative to *https://api.songtradr.com*
4
-
5
- | Method | HTTP request | Description |
6
- | ------ | ------------ | ----------- |
7
- | [**curate_playlist**](PlaylistApi.md#curate_playlist) | **POST** /api/v1/playlist/{methodName} | Curate playlist. |
8
-
9
-
10
- ## curate_playlist
11
-
12
- > <CuratePlaylistResponseDTO> curate_playlist(method_name, curate_playlist_dto)
13
-
14
- Curate playlist.
15
-
16
- ### Examples
17
-
18
- ```ruby
19
- require 'time'
20
- require 'songtradr_api_client_ruby'
21
- # setup authorization
22
- SongtradrApiClientRuby.configure do |config|
23
- # Configure Bearer authorization (JWT): bearer-jwt
24
- config.access_token = 'YOUR_BEARER_TOKEN'
25
- end
26
-
27
- api_instance = SongtradrApiClientRuby::PlaylistApi.new
28
- method_name = 'recommend' # String | Name of the curation task that should be executed
29
- curate_playlist_dto = SongtradrApiClientRuby::CuratePlaylistDTO.new # CuratePlaylistDTO |
30
-
31
- begin
32
- # Curate playlist.
33
- result = api_instance.curate_playlist(method_name, curate_playlist_dto)
34
- p result
35
- rescue SongtradrApiClientRuby::ApiError => e
36
- puts "Error when calling PlaylistApi->curate_playlist: #{e}"
37
- end
38
- ```
39
-
40
- #### Using the curate_playlist_with_http_info variant
41
-
42
- This returns an Array which contains the response data, status code and headers.
43
-
44
- > <Array(<CuratePlaylistResponseDTO>, Integer, Hash)> curate_playlist_with_http_info(method_name, curate_playlist_dto)
45
-
46
- ```ruby
47
- begin
48
- # Curate playlist.
49
- data, status_code, headers = api_instance.curate_playlist_with_http_info(method_name, curate_playlist_dto)
50
- p status_code # => 2xx
51
- p headers # => { ... }
52
- p data # => <CuratePlaylistResponseDTO>
53
- rescue SongtradrApiClientRuby::ApiError => e
54
- puts "Error when calling PlaylistApi->curate_playlist_with_http_info: #{e}"
55
- end
56
- ```
57
-
58
- ### Parameters
59
-
60
- | Name | Type | Description | Notes |
61
- | ---- | ---- | ----------- | ----- |
62
- | **method_name** | **String** | Name of the curation task that should be executed | |
63
- | **curate_playlist_dto** | [**CuratePlaylistDTO**](CuratePlaylistDTO.md) | | |
64
-
65
- ### Return type
66
-
67
- [**CuratePlaylistResponseDTO**](CuratePlaylistResponseDTO.md)
68
-
69
- ### Authorization
70
-
71
- [bearer-jwt](../README.md#bearer-jwt)
72
-
73
- ### HTTP request headers
74
-
75
- - **Content-Type**: application/json
76
- - **Accept**: application/json
77
-
@@ -1,99 +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.17.0
7
- Contact: info@songtradr.com
8
- Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 7.3.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
- # Curate playlist.
23
- # @param method_name [String] Name of the curation task that should be executed
24
- # @param curate_playlist_dto [CuratePlaylistDTO]
25
- # @param [Hash] opts the optional parameters
26
- # @return [CuratePlaylistResponseDTO]
27
- def curate_playlist(method_name, curate_playlist_dto, opts = {})
28
- data, _status_code, _headers = curate_playlist_with_http_info(method_name, curate_playlist_dto, opts)
29
- data
30
- end
31
-
32
- # Curate playlist.
33
- # @param method_name [String] Name of the curation task that should be executed
34
- # @param curate_playlist_dto [CuratePlaylistDTO]
35
- # @param [Hash] opts the optional parameters
36
- # @return [Array<(CuratePlaylistResponseDTO, Integer, Hash)>] CuratePlaylistResponseDTO data, response status code and response headers
37
- def curate_playlist_with_http_info(method_name, curate_playlist_dto, opts = {})
38
- if @api_client.config.debugging
39
- @api_client.config.logger.debug 'Calling API: PlaylistApi.curate_playlist ...'
40
- end
41
- # verify the required parameter 'method_name' is set
42
- if @api_client.config.client_side_validation && method_name.nil?
43
- fail ArgumentError, "Missing the required parameter 'method_name' when calling PlaylistApi.curate_playlist"
44
- end
45
- # verify enum value
46
- allowable_values = ["recommend", "replaceSimilar", "replaceDifferent", "order"]
47
- if @api_client.config.client_side_validation && !allowable_values.include?(method_name)
48
- fail ArgumentError, "invalid value for \"method_name\", must be one of #{allowable_values}"
49
- end
50
- # verify the required parameter 'curate_playlist_dto' is set
51
- if @api_client.config.client_side_validation && curate_playlist_dto.nil?
52
- fail ArgumentError, "Missing the required parameter 'curate_playlist_dto' when calling PlaylistApi.curate_playlist"
53
- end
54
- # resource path
55
- local_var_path = '/api/v1/playlist/{methodName}'.sub('{' + 'methodName' + '}', CGI.escape(method_name.to_s))
56
-
57
- # query parameters
58
- query_params = opts[:query_params] || {}
59
-
60
- # header parameters
61
- header_params = opts[:header_params] || {}
62
- # HTTP header 'Accept' (if needed)
63
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
64
- # HTTP header 'Content-Type'
65
- content_type = @api_client.select_header_content_type(['application/json'])
66
- if !content_type.nil?
67
- header_params['Content-Type'] = content_type
68
- end
69
-
70
- # form parameters
71
- form_params = opts[:form_params] || {}
72
-
73
- # http body (model)
74
- post_body = opts[:debug_body] || @api_client.object_to_http_body(curate_playlist_dto)
75
-
76
- # return_type
77
- return_type = opts[:debug_return_type] || 'CuratePlaylistResponseDTO'
78
-
79
- # auth_names
80
- auth_names = opts[:debug_auth_names] || ['bearer-jwt']
81
-
82
- new_options = opts.merge(
83
- :operation => :"PlaylistApi.curate_playlist",
84
- :header_params => header_params,
85
- :query_params => query_params,
86
- :form_params => form_params,
87
- :body => post_body,
88
- :auth_names => auth_names,
89
- :return_type => return_type
90
- )
91
-
92
- data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
93
- if @api_client.config.debugging
94
- @api_client.config.logger.debug "API called: PlaylistApi#curate_playlist\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
95
- end
96
- return data, status_code, headers
97
- end
98
- end
99
- end
@@ -1,256 +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.17.0
7
- Contact: info@songtradr.com
8
- Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 7.3.0-SNAPSHOT
10
-
11
- =end
12
-
13
- require 'date'
14
- require 'time'
15
-
16
- module SongtradrApiClientRuby
17
- class CuratePlaylistDTO
18
- attr_accessor :request_data
19
-
20
- attr_accessor :usage_filter
21
-
22
- attr_accessor :numerical_filter
23
-
24
- attr_accessor :category_filter
25
-
26
- attr_accessor :first_id
27
-
28
- # Attribute mapping from ruby-style variable name to JSON key.
29
- def self.attribute_map
30
- {
31
- :'request_data' => :'requestData',
32
- :'usage_filter' => :'usageFilter',
33
- :'numerical_filter' => :'numericalFilter',
34
- :'category_filter' => :'categoryFilter',
35
- :'first_id' => :'firstId'
36
- }
37
- end
38
-
39
- # Returns all the JSON keys this model knows about
40
- def self.acceptable_attributes
41
- attribute_map.values
42
- end
43
-
44
- # Attribute type mapping.
45
- def self.openapi_types
46
- {
47
- :'request_data' => :'Array<String>',
48
- :'usage_filter' => :'String',
49
- :'numerical_filter' => :'Hash<String, String>',
50
- :'category_filter' => :'Hash<String, String>',
51
- :'first_id' => :'String'
52
- }
53
- end
54
-
55
- # List of attributes with nullable: true
56
- def self.openapi_nullable
57
- Set.new([
58
- ])
59
- end
60
-
61
- # Initializes the object
62
- # @param [Hash] attributes Model attributes in the form of hash
63
- def initialize(attributes = {})
64
- if (!attributes.is_a?(Hash))
65
- fail ArgumentError, "The input argument (attributes) must be a hash in `SongtradrApiClientRuby::CuratePlaylistDTO` initialize method"
66
- end
67
-
68
- # check to see if the attribute exists and convert string to symbol for hash key
69
- attributes = attributes.each_with_object({}) { |(k, v), h|
70
- if (!self.class.attribute_map.key?(k.to_sym))
71
- fail ArgumentError, "`#{k}` is not a valid attribute in `SongtradrApiClientRuby::CuratePlaylistDTO`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
72
- end
73
- h[k.to_sym] = v
74
- }
75
-
76
- if attributes.key?(:'request_data')
77
- if (value = attributes[:'request_data']).is_a?(Array)
78
- self.request_data = value
79
- end
80
- end
81
-
82
- if attributes.key?(:'usage_filter')
83
- self.usage_filter = attributes[:'usage_filter']
84
- end
85
-
86
- if attributes.key?(:'numerical_filter')
87
- if (value = attributes[:'numerical_filter']).is_a?(Hash)
88
- self.numerical_filter = value
89
- end
90
- end
91
-
92
- if attributes.key?(:'category_filter')
93
- if (value = attributes[:'category_filter']).is_a?(Hash)
94
- self.category_filter = value
95
- end
96
- end
97
-
98
- if attributes.key?(:'first_id')
99
- self.first_id = attributes[:'first_id']
100
- end
101
- end
102
-
103
- # Show invalid properties with the reasons. Usually used together with valid?
104
- # @return Array for valid properties with the reasons
105
- def list_invalid_properties
106
- warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
107
- invalid_properties = Array.new
108
- invalid_properties
109
- end
110
-
111
- # Check to see if the all the properties in the model are valid
112
- # @return true if the model is valid
113
- def valid?
114
- warn '[DEPRECATED] the `valid?` method is obsolete'
115
- true
116
- end
117
-
118
- # Checks equality by comparing each attribute.
119
- # @param [Object] Object to be compared
120
- def ==(o)
121
- return true if self.equal?(o)
122
- self.class == o.class &&
123
- request_data == o.request_data &&
124
- usage_filter == o.usage_filter &&
125
- numerical_filter == o.numerical_filter &&
126
- category_filter == o.category_filter &&
127
- first_id == o.first_id
128
- end
129
-
130
- # @see the `==` method
131
- # @param [Object] Object to be compared
132
- def eql?(o)
133
- self == o
134
- end
135
-
136
- # Calculates hash code according to all attributes.
137
- # @return [Integer] Hash code
138
- def hash
139
- [request_data, usage_filter, numerical_filter, category_filter, first_id].hash
140
- end
141
-
142
- # Builds the object from hash
143
- # @param [Hash] attributes Model attributes in the form of hash
144
- # @return [Object] Returns the model itself
145
- def self.build_from_hash(attributes)
146
- return nil unless attributes.is_a?(Hash)
147
- attributes = attributes.transform_keys(&:to_sym)
148
- transformed_hash = {}
149
- openapi_types.each_pair do |key, type|
150
- if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
151
- transformed_hash["#{key}"] = nil
152
- elsif type =~ /\AArray<(.*)>/i
153
- # check to ensure the input is an array given that the attribute
154
- # is documented as an array but the input is not
155
- if attributes[attribute_map[key]].is_a?(Array)
156
- transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
157
- end
158
- elsif !attributes[attribute_map[key]].nil?
159
- transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
160
- end
161
- end
162
- new(transformed_hash)
163
- end
164
-
165
- # Deserializes the data based on type
166
- # @param string type Data type
167
- # @param string value Value to be deserialized
168
- # @return [Object] Deserialized data
169
- def self._deserialize(type, value)
170
- case type.to_sym
171
- when :Time
172
- Time.parse(value)
173
- when :Date
174
- Date.parse(value)
175
- when :String
176
- value.to_s
177
- when :Integer
178
- value.to_i
179
- when :Float
180
- value.to_f
181
- when :Boolean
182
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
183
- true
184
- else
185
- false
186
- end
187
- when :Object
188
- # generic object (usually a Hash), return directly
189
- value
190
- when /\AArray<(?<inner_type>.+)>\z/
191
- inner_type = Regexp.last_match[:inner_type]
192
- value.map { |v| _deserialize(inner_type, v) }
193
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
194
- k_type = Regexp.last_match[:k_type]
195
- v_type = Regexp.last_match[:v_type]
196
- {}.tap do |hash|
197
- value.each do |k, v|
198
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
199
- end
200
- end
201
- else # model
202
- # models (e.g. Pet) or oneOf
203
- klass = SongtradrApiClientRuby.const_get(type)
204
- klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
205
- end
206
- end
207
-
208
- # Returns the string representation of the object
209
- # @return [String] String presentation of the object
210
- def to_s
211
- to_hash.to_s
212
- end
213
-
214
- # to_body is an alias to to_hash (backward compatibility)
215
- # @return [Hash] Returns the object in the form of hash
216
- def to_body
217
- to_hash
218
- end
219
-
220
- # Returns the object in the form of hash
221
- # @return [Hash] Returns the object in the form of hash
222
- def to_hash
223
- hash = {}
224
- self.class.attribute_map.each_pair do |attr, param|
225
- value = self.send(attr)
226
- if value.nil?
227
- is_nullable = self.class.openapi_nullable.include?(attr)
228
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
229
- end
230
-
231
- hash[param] = _to_hash(value)
232
- end
233
- hash
234
- end
235
-
236
- # Outputs non-array value in the form of hash
237
- # For object, use to_hash. Otherwise, just return the value
238
- # @param [Object] value Any valid value
239
- # @return [Hash] Returns the value in the form of hash
240
- def _to_hash(value)
241
- if value.is_a?(Array)
242
- value.compact.map { |v| _to_hash(v) }
243
- elsif value.is_a?(Hash)
244
- {}.tap do |hash|
245
- value.each { |k, v| hash[k] = _to_hash(v) }
246
- end
247
- elsif value.respond_to? :to_hash
248
- value.to_hash
249
- else
250
- value
251
- end
252
- end
253
-
254
- end
255
-
256
- end