Class: Aimastering::MasteringApi
- Inherits:
-
Object
- Object
- Aimastering::MasteringApi
- Defined in:
- lib/aimastering/api/mastering_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#cancel_mastering(id, opts = {}) ⇒ Mastering
Cancel a mastering by id.
-
#cancel_mastering_with_http_info(id, opts = {}) ⇒ Array<(Mastering, Fixnum, Hash)>
Cancel a mastering by id.
-
#create_mastering(input_audio_id, opts = {}) ⇒ Mastering
Create a new mastering.
-
#create_mastering_with_http_info(input_audio_id, opts = {}) ⇒ Array<(Mastering, Fixnum, Hash)>
Create a new mastering.
-
#delete_mastering(id, opts = {}) ⇒ Mastering
Delete mastering.
-
#delete_mastering_with_http_info(id, opts = {}) ⇒ Array<(Mastering, Fixnum, Hash)>
Delete mastering.
-
#get_mastering(id, opts = {}) ⇒ Mastering
Get a mastering by id.
-
#get_mastering_unlock_product(id, opts = {}) ⇒ Mastering
Review a mastering by id.
-
#get_mastering_unlock_product_with_http_info(id, opts = {}) ⇒ Array<(Mastering, Fixnum, Hash)>
Review a mastering by id.
-
#get_mastering_with_http_info(id, opts = {}) ⇒ Array<(Mastering, Fixnum, Hash)>
Get a mastering by id.
-
#initialize(api_client = ApiClient.default) ⇒ MasteringApi
constructor
A new instance of MasteringApi.
-
#list_masterings(opts = {}) ⇒ Array<Mastering>
Get all accessable masterings.
-
#list_masterings_with_http_info(opts = {}) ⇒ Array<(Array<Mastering>, Fixnum, Hash)>
Get all accessable masterings.
-
#publish_mastering(id, access_token, message, opts = {}) ⇒ Mastering
Publish a mastering by id.
-
#publish_mastering_with_http_info(id, access_token, message, opts = {}) ⇒ Array<(Mastering, Fixnum, Hash)>
Publish a mastering by id.
-
#review_mastering(id, opts = {}) ⇒ Mastering
Review a mastering by id.
-
#review_mastering_with_http_info(id, opts = {}) ⇒ Array<(Mastering, Fixnum, Hash)>
Review a mastering by id.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ MasteringApi
Returns a new instance of MasteringApi.
19 20 21 |
# File 'lib/aimastering/api/mastering_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/aimastering/api/mastering_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#cancel_mastering(id, opts = {}) ⇒ Mastering
Cancel a mastering by id.
28 29 30 31 |
# File 'lib/aimastering/api/mastering_api.rb', line 28 def cancel_mastering(id, opts = {}) data, _status_code, _headers = cancel_mastering_with_http_info(id, opts) return data end |
#cancel_mastering_with_http_info(id, opts = {}) ⇒ Array<(Mastering, Fixnum, Hash)>
Cancel a mastering by id.
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 |
# File 'lib/aimastering/api/mastering_api.rb', line 38 def cancel_mastering_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: MasteringApi.cancel_mastering ..." end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling MasteringApi.cancel_mastering" end if @api_client.config.client_side_validation && id < 1 fail ArgumentError, 'invalid value for "id" when calling MasteringApi.cancel_mastering, must be greater than or equal to 1.' end # resource path local_var_path = "/masterings/{id}/cancel".sub('{' + 'id' + '}', id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['bearer'] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Mastering') if @api_client.config.debugging @api_client.config.logger.debug "API called: MasteringApi#cancel_mastering\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create_mastering(input_audio_id, opts = {}) ⇒ Mastering
Create a new mastering.
103 104 105 106 |
# File 'lib/aimastering/api/mastering_api.rb', line 103 def create_mastering(input_audio_id, opts = {}) data, _status_code, _headers = create_mastering_with_http_info(input_audio_id, opts) return data end |
#create_mastering_with_http_info(input_audio_id, opts = {}) ⇒ Array<(Mastering, Fixnum, Hash)>
Create a new mastering.
131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 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 211 212 213 214 215 216 217 218 219 220 221 |
# File 'lib/aimastering/api/mastering_api.rb', line 131 def create_mastering_with_http_info(input_audio_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: MasteringApi.create_mastering ..." end # verify the required parameter 'input_audio_id' is set if @api_client.config.client_side_validation && input_audio_id.nil? fail ArgumentError, "Missing the required parameter 'input_audio_id' when calling MasteringApi.create_mastering" end if @api_client.config.client_side_validation && input_audio_id < 1 fail ArgumentError, 'invalid value for "input_audio_id" when calling MasteringApi.create_mastering, must be greater than or equal to 1.' end if @api_client.config.client_side_validation && opts[:'mode'] && !['default', 'custom', 'preset'].include?(opts[:'mode']) fail ArgumentError, 'invalid value for "mode", must be one of default, custom, preset' end if @api_client.config.client_side_validation && opts[:'preset'] && !['general', 'pop', 'classical', 'jazz'].include?(opts[:'preset']) fail ArgumentError, 'invalid value for "preset", must be one of general, pop, classical, jazz' end if @api_client.config.client_side_validation && !opts[:'mastering_matching_level'].nil? && opts[:'mastering_matching_level'] > 1 fail ArgumentError, 'invalid value for "opts[:"mastering_matching_level"]" when calling MasteringApi.create_mastering, must be smaller than or equal to 1.' end if @api_client.config.client_side_validation && !opts[:'mastering_matching_level'].nil? && opts[:'mastering_matching_level'] < 0 fail ArgumentError, 'invalid value for "opts[:"mastering_matching_level"]" when calling MasteringApi.create_mastering, must be greater than or equal to 0.' end if @api_client.config.client_side_validation && !opts[:'reference_audio_id'].nil? && opts[:'reference_audio_id'] < 1 fail ArgumentError, 'invalid value for "opts[:"reference_audio_id"]" when calling MasteringApi.create_mastering, must be greater than or equal to 1.' end if @api_client.config.client_side_validation && !opts[:'low_cut_freq'].nil? && opts[:'low_cut_freq'] < 0 fail ArgumentError, 'invalid value for "opts[:"low_cut_freq"]" when calling MasteringApi.create_mastering, must be greater than or equal to 0.' end if @api_client.config.client_side_validation && !opts[:'high_cut_freq'].nil? && opts[:'high_cut_freq'] < 0 fail ArgumentError, 'invalid value for "opts[:"high_cut_freq"]" when calling MasteringApi.create_mastering, must be greater than or equal to 0.' end if @api_client.config.client_side_validation && opts[:'output_format'] && !['wav', 'mp3'].include?(opts[:'output_format']) fail ArgumentError, 'invalid value for "output_format", must be one of wav, mp3' end # resource path local_var_path = "/masterings" # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data']) # form parameters form_params = {} form_params["input_audio_id"] = input_audio_id form_params["mode"] = opts[:'mode'] if !opts[:'mode'].nil? form_params["bass_preservation"] = opts[:'bass_preservation'] if !opts[:'bass_preservation'].nil? form_params["mastering"] = opts[:'mastering'] if !opts[:'mastering'].nil? form_params["preset"] = opts[:'preset'] if !opts[:'preset'].nil? form_params["target_loudness"] = opts[:'target_loudness'] if !opts[:'target_loudness'].nil? form_params["mastering_matching_level"] = opts[:'mastering_matching_level'] if !opts[:'mastering_matching_level'].nil? form_params["mastering_reverb"] = opts[:'mastering_reverb'] if !opts[:'mastering_reverb'].nil? form_params["mastering_reverb_gain"] = opts[:'mastering_reverb_gain'] if !opts[:'mastering_reverb_gain'].nil? form_params["reference_audio_id"] = opts[:'reference_audio_id'] if !opts[:'reference_audio_id'].nil? form_params["low_cut_freq"] = opts[:'low_cut_freq'] if !opts[:'low_cut_freq'].nil? form_params["high_cut_freq"] = opts[:'high_cut_freq'] if !opts[:'high_cut_freq'].nil? form_params["sample_rate"] = opts[:'sample_rate'] if !opts[:'sample_rate'].nil? form_params["bit_depth"] = opts[:'bit_depth'] if !opts[:'bit_depth'].nil? form_params["output_format"] = opts[:'output_format'] if !opts[:'output_format'].nil? form_params["for_preview"] = opts[:'for_preview'] if !opts[:'for_preview'].nil? form_params["start_at"] = opts[:'start_at'] if !opts[:'start_at'].nil? form_params["end_at"] = opts[:'end_at'] if !opts[:'end_at'].nil? form_params["is_bakuage"] = opts[:'is_bakuage'] if !opts[:'is_bakuage'].nil? # http body (model) post_body = nil auth_names = ['bearer'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Mastering') if @api_client.config.debugging @api_client.config.logger.debug "API called: MasteringApi#create_mastering\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_mastering(id, opts = {}) ⇒ Mastering
Delete mastering.
228 229 230 231 |
# File 'lib/aimastering/api/mastering_api.rb', line 228 def delete_mastering(id, opts = {}) data, _status_code, _headers = delete_mastering_with_http_info(id, opts) return data end |
#delete_mastering_with_http_info(id, opts = {}) ⇒ Array<(Mastering, Fixnum, Hash)>
Delete mastering.
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 |
# File 'lib/aimastering/api/mastering_api.rb', line 238 def delete_mastering_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: MasteringApi.delete_mastering ..." end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling MasteringApi.delete_mastering" end if @api_client.config.client_side_validation && id < 1 fail ArgumentError, 'invalid value for "id" when calling MasteringApi.delete_mastering, must be greater than or equal to 1.' end # resource path local_var_path = "/masterings/{id}".sub('{' + 'id' + '}', id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['bearer'] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Mastering') if @api_client.config.debugging @api_client.config.logger.debug "API called: MasteringApi#delete_mastering\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_mastering(id, opts = {}) ⇒ Mastering
Get a mastering by id.
285 286 287 288 |
# File 'lib/aimastering/api/mastering_api.rb', line 285 def get_mastering(id, opts = {}) data, _status_code, _headers = get_mastering_with_http_info(id, opts) return data end |
#get_mastering_unlock_product(id, opts = {}) ⇒ Mastering
Review a mastering by id.
342 343 344 345 |
# File 'lib/aimastering/api/mastering_api.rb', line 342 def get_mastering_unlock_product(id, opts = {}) data, _status_code, _headers = get_mastering_unlock_product_with_http_info(id, opts) return data end |
#get_mastering_unlock_product_with_http_info(id, opts = {}) ⇒ Array<(Mastering, Fixnum, Hash)>
Review a mastering by id.
352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 |
# File 'lib/aimastering/api/mastering_api.rb', line 352 def get_mastering_unlock_product_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: MasteringApi.get_mastering_unlock_product ..." end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling MasteringApi.get_mastering_unlock_product" end if @api_client.config.client_side_validation && id < 1 fail ArgumentError, 'invalid value for "id" when calling MasteringApi.get_mastering_unlock_product, must be greater than or equal to 1.' end # resource path local_var_path = "/masterings/{id}/unlock_product".sub('{' + 'id' + '}', id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['bearer'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Mastering') if @api_client.config.debugging @api_client.config.logger.debug "API called: MasteringApi#get_mastering_unlock_product\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_mastering_with_http_info(id, opts = {}) ⇒ Array<(Mastering, Fixnum, Hash)>
Get a mastering by id.
295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 |
# File 'lib/aimastering/api/mastering_api.rb', line 295 def get_mastering_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: MasteringApi.get_mastering ..." end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling MasteringApi.get_mastering" end if @api_client.config.client_side_validation && id < 1 fail ArgumentError, 'invalid value for "id" when calling MasteringApi.get_mastering, must be greater than or equal to 1.' end # resource path local_var_path = "/masterings/{id}".sub('{' + 'id' + '}', id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['bearer'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Mastering') if @api_client.config.debugging @api_client.config.logger.debug "API called: MasteringApi#get_mastering\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_masterings(opts = {}) ⇒ Array<Mastering>
Get all accessable masterings.
398 399 400 401 |
# File 'lib/aimastering/api/mastering_api.rb', line 398 def list_masterings(opts = {}) data, _status_code, _headers = list_masterings_with_http_info(opts) return data end |
#list_masterings_with_http_info(opts = {}) ⇒ Array<(Array<Mastering>, Fixnum, Hash)>
Get all accessable masterings.
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 438 439 |
# File 'lib/aimastering/api/mastering_api.rb', line 407 def list_masterings_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: MasteringApi.list_masterings ..." end # resource path local_var_path = "/masterings" # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['bearer'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Array<Mastering>') if @api_client.config.debugging @api_client.config.logger.debug "API called: MasteringApi#list_masterings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#publish_mastering(id, access_token, message, opts = {}) ⇒ Mastering
Publish a mastering by id.
450 451 452 453 |
# File 'lib/aimastering/api/mastering_api.rb', line 450 def publish_mastering(id, access_token, , opts = {}) data, _status_code, _headers = publish_mastering_with_http_info(id, access_token, , opts) return data end |
#publish_mastering_with_http_info(id, access_token, message, opts = {}) ⇒ Array<(Mastering, Fixnum, Hash)>
Publish a mastering by id.
464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 |
# File 'lib/aimastering/api/mastering_api.rb', line 464 def publish_mastering_with_http_info(id, access_token, , opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: MasteringApi.publish_mastering ..." end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling MasteringApi.publish_mastering" end if @api_client.config.client_side_validation && id < 1 fail ArgumentError, 'invalid value for "id" when calling MasteringApi.publish_mastering, must be greater than or equal to 1.' end # verify the required parameter 'access_token' is set if @api_client.config.client_side_validation && access_token.nil? fail ArgumentError, "Missing the required parameter 'access_token' when calling MasteringApi.publish_mastering" end # verify the required parameter 'message' is set if @api_client.config.client_side_validation && .nil? fail ArgumentError, "Missing the required parameter 'message' when calling MasteringApi.publish_mastering" end if @api_client.config.client_side_validation && opts[:'service'] && !['twitter', 'youtube'].include?(opts[:'service']) fail ArgumentError, 'invalid value for "service", must be one of twitter, youtube' end # resource path local_var_path = "/masterings/{id}/publish".sub('{' + 'id' + '}', id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data']) # form parameters form_params = {} form_params["access_token"] = access_token form_params["message"] = form_params["service"] = opts[:'service'] if !opts[:'service'].nil? form_params["access_token_secret"] = opts[:'access_token_secret'] if !opts[:'access_token_secret'].nil? # http body (model) post_body = nil auth_names = ['bearer'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Mastering') if @api_client.config.debugging @api_client.config.logger.debug "API called: MasteringApi#publish_mastering\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#review_mastering(id, opts = {}) ⇒ Mastering
Review a mastering by id.
530 531 532 533 |
# File 'lib/aimastering/api/mastering_api.rb', line 530 def review_mastering(id, opts = {}) data, _status_code, _headers = review_mastering_with_http_info(id, opts) return data end |
#review_mastering_with_http_info(id, opts = {}) ⇒ Array<(Mastering, Fixnum, Hash)>
Review a mastering by id.
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 |
# File 'lib/aimastering/api/mastering_api.rb', line 542 def review_mastering_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: MasteringApi.review_mastering ..." end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling MasteringApi.review_mastering" end if @api_client.config.client_side_validation && id < 1 fail ArgumentError, 'invalid value for "id" when calling MasteringApi.review_mastering, must be greater than or equal to 1.' end if @api_client.config.client_side_validation && !opts[:'review_score'].nil? && opts[:'review_score'] > 1 fail ArgumentError, 'invalid value for "opts[:"review_score"]" when calling MasteringApi.review_mastering, must be smaller than or equal to 1.' end if @api_client.config.client_side_validation && !opts[:'review_score'].nil? && opts[:'review_score'] < 0 fail ArgumentError, 'invalid value for "opts[:"review_score"]" when calling MasteringApi.review_mastering, must be greater than or equal to 0.' end # resource path local_var_path = "/masterings/{id}/review".sub('{' + 'id' + '}', id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data']) # form parameters form_params = {} form_params["review_comment"] = opts[:'review_comment'] if !opts[:'review_comment'].nil? form_params["review_score"] = opts[:'review_score'] if !opts[:'review_score'].nil? # http body (model) post_body = nil auth_names = ['bearer'] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Mastering') if @api_client.config.debugging @api_client.config.logger.debug "API called: MasteringApi#review_mastering\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |