Class: SongtradrApiClientRuby::RecordingApi
- Inherits:
-
Object
- Object
- SongtradrApiClientRuby::RecordingApi
- Defined in:
- lib/songtradr_api_client_ruby/api/recording_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#initialize(api_client = ApiClient.default) ⇒ RecordingApi
constructor
A new instance of RecordingApi.
-
#prompt_search_recordings(query, opts = {}) ⇒ RecordingListDTO
Recordings for query.
-
#prompt_search_recordings_with_http_info(query, opts = {}) ⇒ Array<(RecordingListDTO, Integer, Hash)>
Recordings for query.
-
#recordings_by_ids_with_musical_features(ids, opts = {}) ⇒ Array<RecordingMinimalWithMusicalFeaturesDTO>
AI generated moods, musical features and more for recordings.
-
#recordings_by_ids_with_musical_features_with_http_info(ids, opts = {}) ⇒ Array<(Array<RecordingMinimalWithMusicalFeaturesDTO>, Integer, Hash)>
AI generated moods, musical features and more for recordings.
-
#recordings_by_ids_with_similarities1(ids, opts = {}) ⇒ Array<RecordingForSimilaritySearchDTO>
Similar recordings for a list of recordings.
-
#recordings_by_ids_with_similarities1_with_http_info(ids, opts = {}) ⇒ Array<(Array<RecordingForSimilaritySearchDTO>, Integer, Hash)>
Similar recordings for a list of recordings.
-
#recordings_by_ids_with_taggrams1(ids, opts = {}) ⇒ Array<RecordingMinimalWithTaggramsDTO>
Timeseries of AI generated moods, musical features and more for a list of recordings.
-
#recordings_by_ids_with_taggrams1_with_http_info(ids, opts = {}) ⇒ Array<(Array<RecordingMinimalWithTaggramsDTO>, Integer, Hash)>
Timeseries of AI generated moods, musical features and more for a list of recordings.
-
#recordings_by_ids_with_tagstrengths1(ids, opts = {}) ⇒ Array<RecordingMinimalWithTagstrengthsDTO>
Strengths as numerical representations for AI generated moods, musical features and more for recordings.
-
#recordings_by_ids_with_tagstrengths1_with_http_info(ids, opts = {}) ⇒ Array<(Array<RecordingMinimalWithTagstrengthsDTO>, Integer, Hash)>
Strengths as numerical representations for AI generated moods, musical features and more for recordings.
-
#recordings_medium_by_ids1(ids, opts = {}) ⇒ Array<RecordingMediumDTO>
Recordings by IDs with a medium sized response.
-
#recordings_medium_by_ids1_with_http_info(ids, opts = {}) ⇒ Array<(Array<RecordingMediumDTO>, Integer, Hash)>
Recordings by IDs with a medium sized response.
-
#search_recordings(opts = {}) ⇒ RecordingListDTO
Recordings by contributors, moods, musical features and more.
-
#search_recordings_with_http_info(opts = {}) ⇒ Array<(RecordingListDTO, Integer, Hash)>
Recordings by contributors, moods, musical features and more.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ RecordingApi
Returns a new instance of RecordingApi.
19 20 21 |
# File 'lib/songtradr_api_client_ruby/api/recording_api.rb', line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/songtradr_api_client_ruby/api/recording_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#prompt_search_recordings(query, opts = {}) ⇒ RecordingListDTO
Recordings for query.
26 27 28 29 |
# File 'lib/songtradr_api_client_ruby/api/recording_api.rb', line 26 def prompt_search_recordings(query, opts = {}) data, _status_code, _headers = prompt_search_recordings_with_http_info(query, opts) data end |
#prompt_search_recordings_with_http_info(query, opts = {}) ⇒ Array<(RecordingListDTO, Integer, Hash)>
Recordings for query.
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 |
# File 'lib/songtradr_api_client_ruby/api/recording_api.rb', line 35 def prompt_search_recordings_with_http_info(query, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: RecordingApi.prompt_search_recordings ...' end # verify the required parameter 'query' is set if @api_client.config.client_side_validation && query.nil? fail ArgumentError, "Missing the required parameter 'query' when calling RecordingApi.prompt_search_recordings" end # resource path local_var_path = '/api/v1/public/recording/promptSearch' # query parameters query_params = opts[:query_params] || {} query_params[:'query'] = query # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'RecordingListDTO' # auth_names auth_names = opts[:debug_auth_names] || ['bearer-jwt'] = opts.merge( :operation => :"RecordingApi.prompt_search_recordings", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: RecordingApi#prompt_search_recordings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#recordings_by_ids_with_musical_features(ids, opts = {}) ⇒ Array<RecordingMinimalWithMusicalFeaturesDTO>
AI generated moods, musical features and more for recordings.
88 89 90 91 |
# File 'lib/songtradr_api_client_ruby/api/recording_api.rb', line 88 def recordings_by_ids_with_musical_features(ids, opts = {}) data, _status_code, _headers = recordings_by_ids_with_musical_features_with_http_info(ids, opts) data end |
#recordings_by_ids_with_musical_features_with_http_info(ids, opts = {}) ⇒ Array<(Array<RecordingMinimalWithMusicalFeaturesDTO>, Integer, Hash)>
AI generated moods, musical features and more for recordings.
97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 |
# File 'lib/songtradr_api_client_ruby/api/recording_api.rb', line 97 def recordings_by_ids_with_musical_features_with_http_info(ids, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: RecordingApi.recordings_by_ids_with_musical_features ...' end # verify the required parameter 'ids' is set if @api_client.config.client_side_validation && ids.nil? fail ArgumentError, "Missing the required parameter 'ids' when calling RecordingApi.recordings_by_ids_with_musical_features" end # resource path local_var_path = '/api/v1/public/recording/{ids}/musicalFeatures'.sub('{' + 'ids' + '}', CGI.escape(ids.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Array<RecordingMinimalWithMusicalFeaturesDTO>' # auth_names auth_names = opts[:debug_auth_names] || ['bearer-jwt'] = opts.merge( :operation => :"RecordingApi.recordings_by_ids_with_musical_features", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: RecordingApi#recordings_by_ids_with_musical_features\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#recordings_by_ids_with_similarities1(ids, opts = {}) ⇒ Array<RecordingForSimilaritySearchDTO>
Similar recordings for a list of recordings.
151 152 153 154 |
# File 'lib/songtradr_api_client_ruby/api/recording_api.rb', line 151 def recordings_by_ids_with_similarities1(ids, opts = {}) data, _status_code, _headers = recordings_by_ids_with_similarities1_with_http_info(ids, opts) data end |
#recordings_by_ids_with_similarities1_with_http_info(ids, opts = {}) ⇒ Array<(Array<RecordingForSimilaritySearchDTO>, Integer, Hash)>
Similar recordings for a list of recordings.
162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 |
# File 'lib/songtradr_api_client_ruby/api/recording_api.rb', line 162 def recordings_by_ids_with_similarities1_with_http_info(ids, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: RecordingApi.recordings_by_ids_with_similarities1 ...' end # verify the required parameter 'ids' is set if @api_client.config.client_side_validation && ids.nil? fail ArgumentError, "Missing the required parameter 'ids' when calling RecordingApi.recordings_by_ids_with_similarities1" end # resource path local_var_path = '/api/v1/public/recording/{ids}/similarities'.sub('{' + 'ids' + '}', CGI.escape(ids.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'identicalOnly'] = opts[:'identical_only'] if !opts[:'identical_only'].nil? query_params[:'usage'] = opts[:'usage'] if !opts[:'usage'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Array<RecordingForSimilaritySearchDTO>' # auth_names auth_names = opts[:debug_auth_names] || ['bearer-jwt'] = opts.merge( :operation => :"RecordingApi.recordings_by_ids_with_similarities1", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: RecordingApi#recordings_by_ids_with_similarities1\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#recordings_by_ids_with_taggrams1(ids, opts = {}) ⇒ Array<RecordingMinimalWithTaggramsDTO>
Timeseries of AI generated moods, musical features and more for a list of recordings.
222 223 224 225 |
# File 'lib/songtradr_api_client_ruby/api/recording_api.rb', line 222 def recordings_by_ids_with_taggrams1(ids, opts = {}) data, _status_code, _headers = recordings_by_ids_with_taggrams1_with_http_info(ids, opts) data end |
#recordings_by_ids_with_taggrams1_with_http_info(ids, opts = {}) ⇒ Array<(Array<RecordingMinimalWithTaggramsDTO>, Integer, Hash)>
Timeseries of AI generated moods, musical features and more for a list of recordings.
237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 |
# File 'lib/songtradr_api_client_ruby/api/recording_api.rb', line 237 def recordings_by_ids_with_taggrams1_with_http_info(ids, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: RecordingApi.recordings_by_ids_with_taggrams1 ...' end # verify the required parameter 'ids' is set if @api_client.config.client_side_validation && ids.nil? fail ArgumentError, "Missing the required parameter 'ids' when calling RecordingApi.recordings_by_ids_with_taggrams1" end allowable_values = ["instrument", "vocals", "energy", "soundGeneration", "rhythm", "songRating", "performanceRating", "productionRating", "moodCluster", "tonality", "arousal", "valence", "pleasantness", "engagement", "timbre", "roughness", "harmony", "texture", "groovyness", "space", "audienceAge", "audienceRegion", "audienceGender", "originRegion", "originDecade", "languageOfPerformance", "level1Genre", "level2Genre", "curateability", "useCase", "channelSuitability", "industrySuitability", "loudness"] if @api_client.config.client_side_validation && opts[:'category_name'] && !allowable_values.include?(opts[:'category_name']) fail ArgumentError, "invalid value for \"category_name\", must be one of #{allowable_values}" end # resource path local_var_path = '/api/v1/public/recording/{ids}/taggrams'.sub('{' + 'ids' + '}', CGI.escape(ids.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'categoryName'] = opts[:'category_name'] if !opts[:'category_name'].nil? query_params[:'tagName'] = opts[:'tag_name'] if !opts[:'tag_name'].nil? query_params[:'genreName'] = opts[:'genre_name'] if !opts[:'genre_name'].nil? query_params[:'fromTimestamp'] = opts[:'from_timestamp'] if !opts[:'from_timestamp'].nil? query_params[:'toTimestamp'] = opts[:'to_timestamp'] if !opts[:'to_timestamp'].nil? query_params[:'fillWithZero'] = opts[:'fill_with_zero'] if !opts[:'fill_with_zero'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Array<RecordingMinimalWithTaggramsDTO>' # auth_names auth_names = opts[:debug_auth_names] || ['bearer-jwt'] = opts.merge( :operation => :"RecordingApi.recordings_by_ids_with_taggrams1", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: RecordingApi#recordings_by_ids_with_taggrams1\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#recordings_by_ids_with_tagstrengths1(ids, opts = {}) ⇒ Array<RecordingMinimalWithTagstrengthsDTO>
Strengths as numerical representations for AI generated moods, musical features and more for recordings.
302 303 304 305 |
# File 'lib/songtradr_api_client_ruby/api/recording_api.rb', line 302 def (ids, opts = {}) data, _status_code, _headers = (ids, opts) data end |
#recordings_by_ids_with_tagstrengths1_with_http_info(ids, opts = {}) ⇒ Array<(Array<RecordingMinimalWithTagstrengthsDTO>, Integer, Hash)>
Strengths as numerical representations for AI generated moods, musical features and more for recordings.
314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 |
# File 'lib/songtradr_api_client_ruby/api/recording_api.rb', line 314 def (ids, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: RecordingApi.recordings_by_ids_with_tagstrengths1 ...' end # verify the required parameter 'ids' is set if @api_client.config.client_side_validation && ids.nil? fail ArgumentError, "Missing the required parameter 'ids' when calling RecordingApi.recordings_by_ids_with_tagstrengths1" end allowable_values = ["instrument", "vocals", "energy", "soundGeneration", "rhythm", "songRating", "performanceRating", "productionRating", "moodCluster", "tonality", "arousal", "valence", "pleasantness", "engagement", "timbre", "roughness", "harmony", "texture", "groovyness", "space", "audienceAge", "audienceRegion", "audienceGender", "originRegion", "originDecade", "languageOfPerformance", "level1Genre", "level2Genre", "curateability", "useCase", "channelSuitability", "industrySuitability", "loudness"] if @api_client.config.client_side_validation && opts[:'category_name'] && !allowable_values.include?(opts[:'category_name']) fail ArgumentError, "invalid value for \"category_name\", must be one of #{allowable_values}" end # resource path local_var_path = '/api/v1/public/recording/{ids}/tagstrengths'.sub('{' + 'ids' + '}', CGI.escape(ids.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'categoryName'] = opts[:'category_name'] if !opts[:'category_name'].nil? query_params[:'tagName'] = opts[:'tag_name'] if !opts[:'tag_name'].nil? query_params[:'genreName'] = opts[:'genre_name'] if !opts[:'genre_name'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Array<RecordingMinimalWithTagstrengthsDTO>' # auth_names auth_names = opts[:debug_auth_names] || ['bearer-jwt'] = opts.merge( :operation => :"RecordingApi.recordings_by_ids_with_tagstrengths1", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: RecordingApi#recordings_by_ids_with_tagstrengths1\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#recordings_medium_by_ids1(ids, opts = {}) ⇒ Array<RecordingMediumDTO>
Recordings by IDs with a medium sized response.
376 377 378 379 |
# File 'lib/songtradr_api_client_ruby/api/recording_api.rb', line 376 def recordings_medium_by_ids1(ids, opts = {}) data, _status_code, _headers = recordings_medium_by_ids1_with_http_info(ids, opts) data end |
#recordings_medium_by_ids1_with_http_info(ids, opts = {}) ⇒ Array<(Array<RecordingMediumDTO>, Integer, Hash)>
Recordings by IDs with a medium sized response.
388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 |
# File 'lib/songtradr_api_client_ruby/api/recording_api.rb', line 388 def recordings_medium_by_ids1_with_http_info(ids, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: RecordingApi.recordings_medium_by_ids1 ...' end # verify the required parameter 'ids' is set if @api_client.config.client_side_validation && ids.nil? fail ArgumentError, "Missing the required parameter 'ids' when calling RecordingApi.recordings_medium_by_ids1" end # resource path local_var_path = '/api/v1/public/recording/m/{ids}'.sub('{' + 'ids' + '}', CGI.escape(ids.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil? query_params[:'sort'] = @api_client.build_collection_param(opts[:'sort'], :multi) if !opts[:'sort'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Array<RecordingMediumDTO>' # auth_names auth_names = opts[:debug_auth_names] || ['bearer-jwt'] = opts.merge( :operation => :"RecordingApi.recordings_medium_by_ids1", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: RecordingApi#recordings_medium_by_ids1\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#search_recordings(opts = {}) ⇒ RecordingListDTO
Recordings by contributors, moods, musical features and more.
483 484 485 486 |
# File 'lib/songtradr_api_client_ruby/api/recording_api.rb', line 483 def search_recordings(opts = {}) data, _status_code, _headers = search_recordings_with_http_info(opts) data end |
#search_recordings_with_http_info(opts = {}) ⇒ Array<(RecordingListDTO, Integer, Hash)>
Recordings by contributors, moods, musical features and more.
532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 |
# File 'lib/songtradr_api_client_ruby/api/recording_api.rb', line 532 def search_recordings_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: RecordingApi.search_recordings ...' end allowable_values = ["en", "es", "fr", "de", "jp", "cn", "IT", "RU"] if @api_client.config.client_side_validation && opts[:'language'] && !allowable_values.include?(opts[:'language']) fail ArgumentError, "invalid value for \"language\", must be one of #{allowable_values}" end allowable_values = ["aggressive", "amusing", "anxious", "calm", "devotional", "dreamy", "energetic", "enigmatic", "epic", "erotic", "positive", "sad", "scary", "wild"] if @api_client.config.client_side_validation && opts[:'primary_mood_cluster'] && !allowable_values.include?(opts[:'primary_mood_cluster']) fail ArgumentError, "invalid value for \"primary_mood_cluster\", must be one of #{allowable_values}" end allowable_values = ["very sad", "sad", "moderate valence", "positive", "very positive", "varying valence"] if @api_client.config.client_side_validation && opts[:'valence'] && !allowable_values.include?(opts[:'valence']) fail ArgumentError, "invalid value for \"valence\", must be one of #{allowable_values}" end allowable_values = ["very calm", "calm", "moderate arousal", "energetic", "very energetic", "varying arousal"] if @api_client.config.client_side_validation && opts[:'arousal'] && !allowable_values.include?(opts[:'arousal']) fail ArgumentError, "invalid value for \"arousal\", must be one of #{allowable_values}" end allowable_values = ["very unpleasant", "unpleasant", "neutral pleasantness", "pleasant", "very pleasant", "varying pleasantness"] if @api_client.config.client_side_validation && opts[:'pleasantness'] && !allowable_values.include?(opts[:'pleasantness']) fail ArgumentError, "invalid value for \"pleasantness\", must be one of #{allowable_values}" end allowable_values = ["very unengaging", "unengaging", "neutral engagement", "engaging", "very engaging", "varying engagement"] if @api_client.config.client_side_validation && opts[:'engagement'] && !allowable_values.include?(opts[:'engagement']) fail ArgumentError, "invalid value for \"engagement\", must be one of #{allowable_values}" end allowable_values = ["instrumental", "female vocals", "male vocals", "mixed vocals", "diverse gender vocals"] if @api_client.config.client_side_validation && opts[:'vocals'] && !allowable_values.include?(opts[:'vocals']) fail ArgumentError, "invalid value for \"vocals\", must be one of #{allowable_values}" end allowable_values = ["piano", "electronics", "guitar", "strings", "synthesizer", "wind", "drum kit", "keys", "harpsichord", "choir", "electric bass", "organ", "brass", "percussion", "vocals", "double bass", "harp"] if @api_client.config.client_side_validation && opts[:'dominant_instrument'] && !allowable_values.include?(opts[:'dominant_instrument']) fail ArgumentError, "invalid value for \"dominant_instrument\", must be one of #{allowable_values}" end allowable_values = ["very quiet", "quiet", "moderate", "loud", "very loud", "dynamic"] if @api_client.config.client_side_validation && opts[:'energy'] && !allowable_values.include?(opts[:'energy']) fail ArgumentError, "invalid value for \"energy\", must be one of #{allowable_values}" end allowable_values = ["acoustic", "electric", "electronic", "mixed sound generation"] if @api_client.config.client_side_validation && opts[:'sound_generation'] && !allowable_values.include?(opts[:'sound_generation']) fail ArgumentError, "invalid value for \"sound_generation\", must be one of #{allowable_values}" end allowable_values = ["very slow", "slow", "mid-tempo", "fast", "very fast", "varying tempo"] if @api_client.config.client_side_validation && opts[:'tempo'] && !allowable_values.include?(opts[:'tempo']) fail ArgumentError, "invalid value for \"tempo\", must be one of #{allowable_values}" end allowable_values = ["major key", "minor key", "neutral key"] if @api_client.config.client_side_validation && opts[:'scale'] && !allowable_values.include?(opts[:'scale']) fail ArgumentError, "invalid value for \"scale\", must be one of #{allowable_values}" end allowable_values = ["C", "C#", "D", "D#", "E", "F", "F#", "G", "G#", "A", "A#", "B", "unclear"] if @api_client.config.client_side_validation && opts[:'key'] && !allowable_values.include?(opts[:'key']) fail ArgumentError, "invalid value for \"key\", must be one of #{allowable_values}" end allowable_values = ["common time", "triple meter", "complex time signature", "binary rhythm", "ternary rhythm"] if @api_client.config.client_side_validation && opts[:'rhythm'] && !allowable_values.include?(opts[:'rhythm']) fail ArgumentError, "invalid value for \"rhythm\", must be one of #{allowable_values}" end allowable_values = ["brassy", "bright", "clear", "deep", "distorted", "flat", "full", "groovy", "melodious", "natural", "resonant", "shrill", "steady", "thin", "warm"] if @api_client.config.client_side_validation && opts[:'primary_sound_character'] && !allowable_values.include?(opts[:'primary_sound_character']) fail ArgumentError, "invalid value for \"primary_sound_character\", must be one of #{allowable_values}" end allowable_values = ["very warm", "warm", "moderate timbre", "bright", "very bright"] if @api_client.config.client_side_validation && opts[:'timbre'] && !allowable_values.include?(opts[:'timbre']) fail ArgumentError, "invalid value for \"timbre\", must be one of #{allowable_values}" end allowable_values = ["very clear", "clear", "moderate roughness", "distorted", "very distorted"] if @api_client.config.client_side_validation && opts[:'roughness'] && !allowable_values.include?(opts[:'roughness']) fail ArgumentError, "invalid value for \"roughness\", must be one of #{allowable_values}" end allowable_values = ["monotonous", "moderate melodiousness", "melodious", "atonal"] if @api_client.config.client_side_validation && opts[:'tonality'] && !allowable_values.include?(opts[:'tonality']) fail ArgumentError, "invalid value for \"tonality\", must be one of #{allowable_values}" end allowable_values = ["very dissonant", "dissonant", "moderate harmonies", "harmonious", "very harmonious"] if @api_client.config.client_side_validation && opts[:'harmony'] && !allowable_values.include?(opts[:'harmony']) fail ArgumentError, "invalid value for \"harmony\", must be one of #{allowable_values}" end allowable_values = ["very thin", "thin", "moderate texture", "full", "very full"] if @api_client.config.client_side_validation && opts[:'texture'] && !allowable_values.include?(opts[:'texture']) fail ArgumentError, "invalid value for \"texture\", must be one of #{allowable_values}" end allowable_values = ["very steady", "steady", "moderate rhythm feel", "groovy", "very groovy"] if @api_client.config.client_side_validation && opts[:'groovyness'] && !allowable_values.include?(opts[:'groovyness']) fail ArgumentError, "invalid value for \"groovyness\", must be one of #{allowable_values}" end allowable_values = ["very compact", "compact", "moderate space", "wide", "very wide"] if @api_client.config.client_side_validation && opts[:'space'] && !allowable_values.include?(opts[:'space']) fail ArgumentError, "invalid value for \"space\", must be one of #{allowable_values}" end allowable_values = ["very low", "low", "moderate", "high", "very high"] if @api_client.config.client_side_validation && opts[:'loudness'] && !allowable_values.include?(opts[:'loudness']) fail ArgumentError, "invalid value for \"loudness\", must be one of #{allowable_values}" end allowable_values = ["pre-1950s", "1950s", "1960s", "1970s", "1980s", "1990s", "2000s", "2010s", "2020s"] if @api_client.config.client_side_validation && opts[:'origin_decade'] && !allowable_values.include?(opts[:'origin_decade']) fail ArgumentError, "invalid value for \"origin_decade\", must be one of #{allowable_values}" end allowable_values = ["curateable", "uncurateable"] if @api_client.config.client_side_validation && opts[:'curateability'] && !allowable_values.include?(opts[:'curateability']) fail ArgumentError, "invalid value for \"curateability\", must be one of #{allowable_values}" end allowable_values = ["background", "sport", "focus", "christmas", "film", "summer", "adverts", "party", "relax", "karaoke"] if @api_client.config.client_side_validation && opts[:'use_case'] && !allowable_values.include?(opts[:'use_case']) fail ArgumentError, "invalid value for \"use_case\", must be one of #{allowable_values}" end allowable_values = ["Spotify", "TikTok", "Unfitting", "YouTube"] if @api_client.config.client_side_validation && opts[:'channel_suitability'] && !allowable_values.include?(opts[:'channel_suitability']) fail ArgumentError, "invalid value for \"channel_suitability\", must be one of #{allowable_values}" end allowable_values = ["true", "false"] if @api_client.config.client_side_validation && opts[:'shuffled'] && !allowable_values.include?(opts[:'shuffled']) fail ArgumentError, "invalid value for \"shuffled\", must be one of #{allowable_values}" end allowable_values = ["popularityDesc", "popularityAsc", "releaseDateDesc", "releaseDateAsc"] if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort']) fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}" end # resource path local_var_path = '/api/v1/public/recording/search' # query parameters query_params = opts[:query_params] || {} query_params[:'similarToRecording'] = opts[:'similar_to_recording'] if !opts[:'similar_to_recording'].nil? query_params[:'contributor'] = opts[:'contributor'] if !opts[:'contributor'].nil? query_params[:'mainArtist'] = opts[:'main_artist'] if !opts[:'main_artist'].nil? query_params[:'composer'] = opts[:'composer'] if !opts[:'composer'].nil? query_params[:'title'] = opts[:'title'] if !opts[:'title'].nil? query_params[:'partyAndTitle'] = opts[:'party_and_title'] if !opts[:'party_and_title'].nil? query_params[:'language'] = opts[:'language'] if !opts[:'language'].nil? query_params[:'genre'] = opts[:'genre'] if !opts[:'genre'].nil? query_params[:'primaryMoodCluster'] = opts[:'primary_mood_cluster'] if !opts[:'primary_mood_cluster'].nil? query_params[:'valence'] = opts[:'valence'] if !opts[:'valence'].nil? query_params[:'arousal'] = opts[:'arousal'] if !opts[:'arousal'].nil? query_params[:'pleasantness'] = opts[:'pleasantness'] if !opts[:'pleasantness'].nil? query_params[:'engagement'] = opts[:'engagement'] if !opts[:'engagement'].nil? query_params[:'vocals'] = opts[:'vocals'] if !opts[:'vocals'].nil? query_params[:'dominantInstrument'] = opts[:'dominant_instrument'] if !opts[:'dominant_instrument'].nil? query_params[:'energy'] = opts[:'energy'] if !opts[:'energy'].nil? query_params[:'soundGeneration'] = opts[:'sound_generation'] if !opts[:'sound_generation'].nil? query_params[:'tempo'] = opts[:'tempo'] if !opts[:'tempo'].nil? query_params[:'scale'] = opts[:'scale'] if !opts[:'scale'].nil? query_params[:'key'] = opts[:'key'] if !opts[:'key'].nil? query_params[:'rhythm'] = opts[:'rhythm'] if !opts[:'rhythm'].nil? query_params[:'primarySoundCharacter'] = opts[:'primary_sound_character'] if !opts[:'primary_sound_character'].nil? query_params[:'timbre'] = opts[:'timbre'] if !opts[:'timbre'].nil? query_params[:'roughness'] = opts[:'roughness'] if !opts[:'roughness'].nil? query_params[:'tonality'] = opts[:'tonality'] if !opts[:'tonality'].nil? query_params[:'harmony'] = opts[:'harmony'] if !opts[:'harmony'].nil? query_params[:'texture'] = opts[:'texture'] if !opts[:'texture'].nil? query_params[:'groovyness'] = opts[:'groovyness'] if !opts[:'groovyness'].nil? query_params[:'space'] = opts[:'space'] if !opts[:'space'].nil? query_params[:'loudness'] = opts[:'loudness'] if !opts[:'loudness'].nil? query_params[:'originDecade'] = opts[:'origin_decade'] if !opts[:'origin_decade'].nil? query_params[:'curateability'] = opts[:'curateability'] if !opts[:'curateability'].nil? query_params[:'useCase'] = opts[:'use_case'] if !opts[:'use_case'].nil? query_params[:'channelSuitability'] = opts[:'channel_suitability'] if !opts[:'channel_suitability'].nil? query_params[:'songtradrTrackId'] = opts[:'songtradr_track_id'] if !opts[:'songtradr_track_id'].nil? query_params[:'usage'] = opts[:'usage'] if !opts[:'usage'].nil? query_params[:'similarToSongtradrTrackId'] = opts[:'similar_to_songtradr_track_id'] if !opts[:'similar_to_songtradr_track_id'].nil? query_params[:'shuffled'] = opts[:'shuffled'] if !opts[:'shuffled'].nil? query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'RecordingListDTO' # auth_names auth_names = opts[:debug_auth_names] || ['bearer-jwt'] = opts.merge( :operation => :"RecordingApi.search_recordings", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: RecordingApi#search_recordings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |