aimastering 1.0.0 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (129) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +18 -5
  3. data/aimastering.gemspec +4 -4
  4. data/docs/AccessTokenApi.md +1 -1
  5. data/docs/AmazonSubscription.md +12 -0
  6. data/docs/AmazonSubscriptionApi.md +55 -0
  7. data/docs/Audio.md +4 -0
  8. data/docs/AudioApi.md +4 -2
  9. data/docs/Config.md +1 -0
  10. data/docs/ConfigApi.md +1 -1
  11. data/docs/{DateTime.md → ConfigVersion.md} +2 -1
  12. data/docs/ExternalSearchApi.md +1 -1
  13. data/docs/GroupBuyStatistics.md +8 -0
  14. data/docs/LibraryAudio.md +4 -0
  15. data/docs/LibraryAudioApi.md +1 -1
  16. data/docs/Mastering.md +9 -0
  17. data/docs/MasteringApi.md +151 -29
  18. data/docs/PaymentApi.md +3 -3
  19. data/docs/PaymentCustomerApi.md +1 -1
  20. data/docs/PlanApi.md +1 -1
  21. data/docs/SpSubscription.md +12 -0
  22. data/docs/SpSubscriptionApi.md +112 -0
  23. data/docs/StatisticsApi.md +48 -1
  24. data/docs/Subscription.md +1 -0
  25. data/docs/SubscriptionApi.md +4 -2
  26. data/docs/User.md +3 -0
  27. data/docs/UserApi.md +110 -1
  28. data/docs/UserStatistics.md +13 -0
  29. data/docs/VideoApi.md +1 -1
  30. data/lib/aimastering.rb +8 -1
  31. data/lib/aimastering/api/access_token_api.rb +1 -1
  32. data/lib/aimastering/api/amazon_subscription_api.rb +70 -0
  33. data/lib/aimastering/api/audio_api.rb +4 -1
  34. data/lib/aimastering/api/config_api.rb +1 -1
  35. data/lib/aimastering/api/external_search_api.rb +1 -1
  36. data/lib/aimastering/api/library_audio_api.rb +1 -1
  37. data/lib/aimastering/api/mastering_api.rb +162 -16
  38. data/lib/aimastering/api/payment_api.rb +1 -1
  39. data/lib/aimastering/api/payment_customer_api.rb +1 -1
  40. data/lib/aimastering/api/plan_api.rb +1 -1
  41. data/lib/aimastering/api/sp_subscription_api.rb +133 -0
  42. data/lib/aimastering/api/statistics_api.rb +48 -1
  43. data/lib/aimastering/api/subscription_api.rb +4 -1
  44. data/lib/aimastering/api/user_api.rb +112 -1
  45. data/lib/aimastering/api/video_api.rb +1 -1
  46. data/lib/aimastering/api_client.rb +1 -1
  47. data/lib/aimastering/api_error.rb +1 -1
  48. data/lib/aimastering/configuration.rb +3 -3
  49. data/lib/aimastering/models/access_token.rb +1 -1
  50. data/lib/aimastering/models/amazon_subscription.rb +257 -0
  51. data/lib/aimastering/models/anonymized_mastering.rb +5 -5
  52. data/lib/aimastering/models/audio.rb +38 -2
  53. data/lib/aimastering/models/audio_analysis.rb +1 -1
  54. data/lib/aimastering/models/audio_download_token.rb +1 -1
  55. data/lib/aimastering/models/config.rb +14 -5
  56. data/lib/aimastering/models/config_auth0.rb +1 -1
  57. data/lib/aimastering/models/config_paypal.rb +1 -1
  58. data/lib/aimastering/models/config_stripe.rb +1 -1
  59. data/lib/aimastering/models/{date_time.rb → config_version.rb} +14 -5
  60. data/lib/aimastering/models/external_search_result.rb +1 -1
  61. data/lib/aimastering/models/external_search_result_itunes.rb +1 -1
  62. data/lib/aimastering/models/external_search_result_youtube.rb +1 -1
  63. data/lib/aimastering/models/group_buy_statistics.rb +188 -0
  64. data/lib/aimastering/models/jwt.rb +1 -1
  65. data/lib/aimastering/models/kpi.rb +1 -1
  66. data/lib/aimastering/models/library_audio.rb +38 -2
  67. data/lib/aimastering/models/library_audio_analysis.rb +1 -1
  68. data/lib/aimastering/models/library_audio_like.rb +1 -1
  69. data/lib/aimastering/models/mastering.rb +123 -6
  70. data/lib/aimastering/models/payment.rb +1 -1
  71. data/lib/aimastering/models/payment_customer.rb +1 -1
  72. data/lib/aimastering/models/plan.rb +1 -1
  73. data/lib/aimastering/models/sp_subscription.rb +257 -0
  74. data/lib/aimastering/models/subscription.rb +11 -2
  75. data/lib/aimastering/models/user.rb +29 -2
  76. data/lib/aimastering/models/user_statistics.rb +233 -0
  77. data/lib/aimastering/models/video.rb +1 -1
  78. data/lib/aimastering/models/video_download_token.rb +1 -1
  79. data/lib/aimastering/version.rb +2 -2
  80. data/spec/api/access_token_api_spec.rb +1 -1
  81. data/spec/api/amazon_subscription_api_spec.rb +46 -0
  82. data/spec/api/audio_api_spec.rb +2 -1
  83. data/spec/api/config_api_spec.rb +1 -1
  84. data/spec/api/external_search_api_spec.rb +1 -1
  85. data/spec/api/library_audio_api_spec.rb +1 -1
  86. data/spec/api/mastering_api_spec.rb +35 -4
  87. data/spec/api/payment_api_spec.rb +1 -1
  88. data/spec/api/payment_customer_api_spec.rb +1 -1
  89. data/spec/api/plan_api_spec.rb +1 -1
  90. data/spec/api/sp_subscription_api_spec.rb +59 -0
  91. data/spec/api/statistics_api_spec.rb +12 -1
  92. data/spec/api/subscription_api_spec.rb +2 -1
  93. data/spec/api/user_api_spec.rb +26 -1
  94. data/spec/api/video_api_spec.rb +1 -1
  95. data/spec/api_client_spec.rb +1 -1
  96. data/spec/configuration_spec.rb +4 -4
  97. data/spec/models/access_token_spec.rb +1 -1
  98. data/spec/models/amazon_subscription_spec.rb +70 -0
  99. data/spec/models/anonymized_mastering_spec.rb +3 -3
  100. data/spec/models/audio_analysis_spec.rb +1 -1
  101. data/spec/models/audio_download_token_spec.rb +1 -1
  102. data/spec/models/audio_spec.rb +25 -1
  103. data/spec/models/config_auth0_spec.rb +1 -1
  104. data/spec/models/config_paypal_spec.rb +1 -1
  105. data/spec/models/config_spec.rb +7 -1
  106. data/spec/models/config_stripe_spec.rb +1 -1
  107. data/spec/models/config_version_spec.rb +42 -0
  108. data/spec/models/external_search_result_itunes_spec.rb +1 -1
  109. data/spec/models/external_search_result_spec.rb +1 -1
  110. data/spec/models/external_search_result_youtube_spec.rb +1 -1
  111. data/spec/models/group_buy_statistics_spec.rb +42 -0
  112. data/spec/models/jwt_spec.rb +1 -1
  113. data/spec/models/kpi_spec.rb +1 -1
  114. data/spec/models/library_audio_analysis_spec.rb +1 -1
  115. data/spec/models/library_audio_like_spec.rb +1 -1
  116. data/spec/models/library_audio_spec.rb +25 -1
  117. data/spec/models/mastering_spec.rb +69 -3
  118. data/spec/models/payment_customer_spec.rb +1 -1
  119. data/spec/models/payment_spec.rb +1 -1
  120. data/spec/models/plan_spec.rb +1 -1
  121. data/spec/models/sp_subscription_spec.rb +70 -0
  122. data/spec/models/subscription_spec.rb +7 -1
  123. data/spec/models/user_spec.rb +19 -1
  124. data/spec/models/user_statistics_spec.rb +72 -0
  125. data/spec/models/video_download_token_spec.rb +1 -1
  126. data/spec/models/video_spec.rb +1 -1
  127. data/spec/spec_helper.rb +1 -1
  128. metadata +46 -23
  129. data/spec/models/date_time_spec.rb +0 -36
@@ -4,7 +4,7 @@
4
4
  #This is a AI Mastering API document. You can use the mastering feature of [AI Mastering](https://aimastering.com) through this API.
5
5
 
6
6
  OpenAPI spec version: 1.0.0
7
- Contact: aimasteringcom@gmail.com
7
+ Contact: info@bakuage.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.3.1
10
10
 
@@ -0,0 +1,70 @@
1
+ =begin
2
+ #AI Mastering API
3
+
4
+ #This is a AI Mastering API document. You can use the mastering feature of [AI Mastering](https://aimastering.com) through this API.
5
+
6
+ OpenAPI spec version: 1.0.0
7
+ Contact: info@bakuage.com
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.3.1
10
+
11
+ =end
12
+
13
+ require "uri"
14
+
15
+ module Aimastering
16
+ class AmazonSubscriptionApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+
23
+ # Get all accessable amazon subscriptions.
24
+ #
25
+ # @param [Hash] opts the optional parameters
26
+ # @return [Array<AmazonSubscription>]
27
+ def list_amazon_subscriptions(opts = {})
28
+ data, _status_code, _headers = list_amazon_subscriptions_with_http_info(opts)
29
+ return data
30
+ end
31
+
32
+ # Get all accessable amazon subscriptions.
33
+ #
34
+ # @param [Hash] opts the optional parameters
35
+ # @return [Array<(Array<AmazonSubscription>, Fixnum, Hash)>] Array<AmazonSubscription> data, response status code and response headers
36
+ def list_amazon_subscriptions_with_http_info(opts = {})
37
+ if @api_client.config.debugging
38
+ @api_client.config.logger.debug "Calling API: AmazonSubscriptionApi.list_amazon_subscriptions ..."
39
+ end
40
+ # resource path
41
+ local_var_path = "/amazon_subscriptions"
42
+
43
+ # query parameters
44
+ query_params = {}
45
+
46
+ # header parameters
47
+ header_params = {}
48
+ # HTTP header 'Accept' (if needed)
49
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
50
+
51
+ # form parameters
52
+ form_params = {}
53
+
54
+ # http body (model)
55
+ post_body = nil
56
+ auth_names = ['bearer']
57
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
58
+ :header_params => header_params,
59
+ :query_params => query_params,
60
+ :form_params => form_params,
61
+ :body => post_body,
62
+ :auth_names => auth_names,
63
+ :return_type => 'Array<AmazonSubscription>')
64
+ if @api_client.config.debugging
65
+ @api_client.config.logger.debug "API called: AmazonSubscriptionApi#list_amazon_subscriptions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
66
+ end
67
+ return data, status_code, headers
68
+ end
69
+ end
70
+ end
@@ -4,7 +4,7 @@
4
4
  #This is a AI Mastering API document. You can use the mastering feature of [AI Mastering](https://aimastering.com) through this API.
5
5
 
6
6
  OpenAPI spec version: 1.0.0
7
- Contact: aimasteringcom@gmail.com
7
+ Contact: info@bakuage.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.3.1
10
10
 
@@ -24,6 +24,7 @@ module Aimastering
24
24
  #
25
25
  # @param [Hash] opts the optional parameters
26
26
  # @option opts [File] :file The file to upload.
27
+ # @option opts [String] :name Audio name. If this is not specified, the name in file parameter is used.
27
28
  # @return [Audio]
28
29
  def create_audio(opts = {})
29
30
  data, _status_code, _headers = create_audio_with_http_info(opts)
@@ -34,6 +35,7 @@ module Aimastering
34
35
  #
35
36
  # @param [Hash] opts the optional parameters
36
37
  # @option opts [File] :file The file to upload.
38
+ # @option opts [String] :name Audio name. If this is not specified, the name in file parameter is used.
37
39
  # @return [Array<(Audio, Fixnum, Hash)>] Audio data, response status code and response headers
38
40
  def create_audio_with_http_info(opts = {})
39
41
  if @api_client.config.debugging
@@ -55,6 +57,7 @@ module Aimastering
55
57
  # form parameters
56
58
  form_params = {}
57
59
  form_params["file"] = opts[:'file'] if !opts[:'file'].nil?
60
+ form_params["name"] = opts[:'name'] if !opts[:'name'].nil?
58
61
 
59
62
  # http body (model)
60
63
  post_body = nil
@@ -4,7 +4,7 @@
4
4
  #This is a AI Mastering API document. You can use the mastering feature of [AI Mastering](https://aimastering.com) through this API.
5
5
 
6
6
  OpenAPI spec version: 1.0.0
7
- Contact: aimasteringcom@gmail.com
7
+ Contact: info@bakuage.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.3.1
10
10
 
@@ -4,7 +4,7 @@
4
4
  #This is a AI Mastering API document. You can use the mastering feature of [AI Mastering](https://aimastering.com) through this API.
5
5
 
6
6
  OpenAPI spec version: 1.0.0
7
- Contact: aimasteringcom@gmail.com
7
+ Contact: info@bakuage.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.3.1
10
10
 
@@ -4,7 +4,7 @@
4
4
  #This is a AI Mastering API document. You can use the mastering feature of [AI Mastering](https://aimastering.com) through this API.
5
5
 
6
6
  OpenAPI spec version: 1.0.0
7
- Contact: aimasteringcom@gmail.com
7
+ Contact: info@bakuage.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.3.1
10
10
 
@@ -4,7 +4,7 @@
4
4
  #This is a AI Mastering API document. You can use the mastering feature of [AI Mastering](https://aimastering.com) through this API.
5
5
 
6
6
  OpenAPI spec version: 1.0.0
7
- Contact: aimasteringcom@gmail.com
7
+ Contact: info@bakuage.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.3.1
10
10
 
@@ -83,22 +83,28 @@ module Aimastering
83
83
  # @param [Hash] opts the optional parameters
84
84
  # @option opts [String] :mode Mode (default to default)
85
85
  # @option opts [BOOLEAN] :bass_preservation This parameter represents if the bass preservation is enabled. (default to false)
86
- # @option opts [BOOLEAN] :mastering This parameter represents if the mastering is enabled. This parameter is effective only when the mode is \&quot;default\&quot; or \&quot;custom\&quot;. (default to true)
87
- # @option opts [String] :preset This parameter is effective only when the mode is \&quot;preset\&quot;. (default to general)
88
- # @option opts [Float] :target_loudness This parameter represents the target loudness of the output audio in dB. This parameter is effective only when the mode is \&quot;custom\&quot;. (default to -5.0)
86
+ # @option opts [BOOLEAN] :mastering This parameter represents if the mastering is enabled. This parameter is effective only when the mode is \&quot;default\&quot; or \&quot;custom\&quot;. (default to false)
87
+ # @option opts [String] :mastering_algorithm (default to v2)
88
+ # @option opts [BOOLEAN] :noise_reduction This parameter represents if the nosie reduction is enabled. This parameter is effective only when the mode is \&quot;custom\&quot;. (default to false)
89
+ # @option opts [String] :preset This parameter is effective only when the mode is \&quot;custom\&quot;. (default to general)
90
+ # @option opts [Float] :target_loudness This parameter represents the target loudness of the output audio in dB. This parameter is effective only when the mode is \&quot;custom\&quot;. (default to -5)
91
+ # @option opts [String] :target_loudness_mode (default to loudness)
89
92
  # @option opts [Float] :mastering_matching_level This parameter represents the mastering reference matching level. This parameter is effective only when the mode is \&quot;custom\&quot; and the mastering is enabled. (default to 0.5)
90
93
  # @option opts [BOOLEAN] :mastering_reverb This parameter represents if the mastering reverb is enabled. This parameter is effective only when the mode is \&quot;custom\&quot; and the mastering is enabled. (default to false)
91
- # @option opts [Float] :mastering_reverb_gain This parameter represents the mastering reverb gain relative to the dry sound in dB. This parameter is effective only when the mode is \&quot;custom\&quot; and the mastering is \&quot;true\&quot; and the mastering_reverb is \&quot;true\&quot;. (default to -36.0)
94
+ # @option opts [Float] :mastering_reverb_gain This parameter represents the mastering reverb gain relative to the dry sound in dB. This parameter is effective only when the mode is \&quot;custom\&quot; and the mastering is \&quot;true\&quot; and the mastering_reverb is \&quot;true\&quot;. (default to -36)
92
95
  # @option opts [Integer] :reference_audio_id Reference audio id. This parameter is effective only when the mode is \&quot;custom\&quot; and the mastering is enabled.
93
- # @option opts [Float] :low_cut_freq This parameter represents the low cut freq of the output audio in Hz. This parameter is effective only when the mode is \&quot;custom\&quot;. (default to 20.0)
94
- # @option opts [Float] :high_cut_freq This parameter represents the target loudness of the output audio in Hz. This parameter is effective only when the mode is \&quot;custom\&quot;. (default to 20000.0)
96
+ # @option opts [Float] :low_cut_freq This parameter represents the low cut freq of the output audio in Hz. This parameter is effective only when the mode is \&quot;custom\&quot;. (default to 20)
97
+ # @option opts [Float] :high_cut_freq This parameter represents the high cut freq of the output audio in Hz. This parameter is effective only when the mode is \&quot;custom\&quot;. (default to 20000)
98
+ # @option opts [Float] :ceiling (default to 0)
99
+ # @option opts [String] :ceiling_mode (default to 0)
100
+ # @option opts [Integer] :oversample (default to 1)
95
101
  # @option opts [Integer] :sample_rate This parameter represents the sample rate of the output audio in dB. This parameter is effective only when the mode is \&quot;custom\&quot;. (default to 44100)
96
102
  # @option opts [Integer] :bit_depth This parameter represents the bit depth of the output audio in dB. This parameter is effective only when the mode is \&quot;custom\&quot;. (default to 16)
97
103
  # @option opts [String] :output_format This parameter represents the format of the output audio. This parameter is effective only when the mode is \&quot;custom\&quot;. (default to wav)
98
104
  # @option opts [BOOLEAN] :for_preview If this is true, the mastering is treated for preview purpose (ex. not purchasable, not publishable, short lifetime). (default to false)
99
- # @option opts [Float] :start_at Partial mastering start at. (default to 0.0)
100
- # @option opts [Float] :end_at Partial mastering end at. (default to -1.0)
101
- # @option opts [BOOLEAN] :is_bakuage Deprecated. For backward compatibility. (default to false)
105
+ # @option opts [Float] :start_at Partial mastering start at. (default to 0)
106
+ # @option opts [Float] :end_at Partial mastering end at. (default to -1)
107
+ # @option opts [String] :video_title This parameter represents the title of output video. (default to )
102
108
  # @return [Mastering]
103
109
  def create_mastering(input_audio_id, opts = {})
104
110
  data, _status_code, _headers = create_mastering_with_http_info(input_audio_id, opts)
@@ -112,21 +118,27 @@ module Aimastering
112
118
  # @option opts [String] :mode Mode
113
119
  # @option opts [BOOLEAN] :bass_preservation This parameter represents if the bass preservation is enabled.
114
120
  # @option opts [BOOLEAN] :mastering This parameter represents if the mastering is enabled. This parameter is effective only when the mode is \&quot;default\&quot; or \&quot;custom\&quot;.
115
- # @option opts [String] :preset This parameter is effective only when the mode is \&quot;preset\&quot;.
121
+ # @option opts [String] :mastering_algorithm
122
+ # @option opts [BOOLEAN] :noise_reduction This parameter represents if the nosie reduction is enabled. This parameter is effective only when the mode is \&quot;custom\&quot;.
123
+ # @option opts [String] :preset This parameter is effective only when the mode is \&quot;custom\&quot;.
116
124
  # @option opts [Float] :target_loudness This parameter represents the target loudness of the output audio in dB. This parameter is effective only when the mode is \&quot;custom\&quot;.
125
+ # @option opts [String] :target_loudness_mode
117
126
  # @option opts [Float] :mastering_matching_level This parameter represents the mastering reference matching level. This parameter is effective only when the mode is \&quot;custom\&quot; and the mastering is enabled.
118
127
  # @option opts [BOOLEAN] :mastering_reverb This parameter represents if the mastering reverb is enabled. This parameter is effective only when the mode is \&quot;custom\&quot; and the mastering is enabled.
119
128
  # @option opts [Float] :mastering_reverb_gain This parameter represents the mastering reverb gain relative to the dry sound in dB. This parameter is effective only when the mode is \&quot;custom\&quot; and the mastering is \&quot;true\&quot; and the mastering_reverb is \&quot;true\&quot;.
120
129
  # @option opts [Integer] :reference_audio_id Reference audio id. This parameter is effective only when the mode is \&quot;custom\&quot; and the mastering is enabled.
121
130
  # @option opts [Float] :low_cut_freq This parameter represents the low cut freq of the output audio in Hz. This parameter is effective only when the mode is \&quot;custom\&quot;.
122
- # @option opts [Float] :high_cut_freq This parameter represents the target loudness of the output audio in Hz. This parameter is effective only when the mode is \&quot;custom\&quot;.
131
+ # @option opts [Float] :high_cut_freq This parameter represents the high cut freq of the output audio in Hz. This parameter is effective only when the mode is \&quot;custom\&quot;.
132
+ # @option opts [Float] :ceiling
133
+ # @option opts [String] :ceiling_mode
134
+ # @option opts [Integer] :oversample
123
135
  # @option opts [Integer] :sample_rate This parameter represents the sample rate of the output audio in dB. This parameter is effective only when the mode is \&quot;custom\&quot;.
124
136
  # @option opts [Integer] :bit_depth This parameter represents the bit depth of the output audio in dB. This parameter is effective only when the mode is \&quot;custom\&quot;.
125
137
  # @option opts [String] :output_format This parameter represents the format of the output audio. This parameter is effective only when the mode is \&quot;custom\&quot;.
126
138
  # @option opts [BOOLEAN] :for_preview If this is true, the mastering is treated for preview purpose (ex. not purchasable, not publishable, short lifetime).
127
139
  # @option opts [Float] :start_at Partial mastering start at.
128
140
  # @option opts [Float] :end_at Partial mastering end at.
129
- # @option opts [BOOLEAN] :is_bakuage Deprecated. For backward compatibility.
141
+ # @option opts [String] :video_title This parameter represents the title of output video.
130
142
  # @return [Array<(Mastering, Fixnum, Hash)>] Mastering data, response status code and response headers
131
143
  def create_mastering_with_http_info(input_audio_id, opts = {})
132
144
  if @api_client.config.debugging
@@ -140,12 +152,18 @@ module Aimastering
140
152
  fail ArgumentError, 'invalid value for "input_audio_id" when calling MasteringApi.create_mastering, must be greater than or equal to 1.'
141
153
  end
142
154
 
143
- if @api_client.config.client_side_validation && opts[:'mode'] && !['default', 'custom', 'preset'].include?(opts[:'mode'])
144
- fail ArgumentError, 'invalid value for "mode", must be one of default, custom, preset'
155
+ if @api_client.config.client_side_validation && opts[:'mode'] && !['default', 'custom'].include?(opts[:'mode'])
156
+ fail ArgumentError, 'invalid value for "mode", must be one of default, custom'
157
+ end
158
+ if @api_client.config.client_side_validation && opts[:'mastering_algorithm'] && !['v1', 'v2'].include?(opts[:'mastering_algorithm'])
159
+ fail ArgumentError, 'invalid value for "mastering_algorithm", must be one of v1, v2'
145
160
  end
146
161
  if @api_client.config.client_side_validation && opts[:'preset'] && !['general', 'pop', 'classical', 'jazz'].include?(opts[:'preset'])
147
162
  fail ArgumentError, 'invalid value for "preset", must be one of general, pop, classical, jazz'
148
163
  end
164
+ if @api_client.config.client_side_validation && opts[:'target_loudness_mode'] && !['loudness', 'rms', 'peak', 'youtube_loudness'].include?(opts[:'target_loudness_mode'])
165
+ fail ArgumentError, 'invalid value for "target_loudness_mode", must be one of loudness, rms, peak, youtube_loudness'
166
+ end
149
167
  if @api_client.config.client_side_validation && !opts[:'mastering_matching_level'].nil? && opts[:'mastering_matching_level'] > 1
150
168
  fail ArgumentError, 'invalid value for "opts[:"mastering_matching_level"]" when calling MasteringApi.create_mastering, must be smaller than or equal to 1.'
151
169
  end
@@ -166,6 +184,9 @@ module Aimastering
166
184
  fail ArgumentError, 'invalid value for "opts[:"high_cut_freq"]" when calling MasteringApi.create_mastering, must be greater than or equal to 0.'
167
185
  end
168
186
 
187
+ if @api_client.config.client_side_validation && opts[:'ceiling_mode'] && !['peak', 'true_peak', 'lowpass_true_peak'].include?(opts[:'ceiling_mode'])
188
+ fail ArgumentError, 'invalid value for "ceiling_mode", must be one of peak, true_peak, lowpass_true_peak'
189
+ end
169
190
  if @api_client.config.client_side_validation && opts[:'output_format'] && !['wav', 'mp3'].include?(opts[:'output_format'])
170
191
  fail ArgumentError, 'invalid value for "output_format", must be one of wav, mp3'
171
192
  end
@@ -188,21 +209,27 @@ module Aimastering
188
209
  form_params["mode"] = opts[:'mode'] if !opts[:'mode'].nil?
189
210
  form_params["bass_preservation"] = opts[:'bass_preservation'] if !opts[:'bass_preservation'].nil?
190
211
  form_params["mastering"] = opts[:'mastering'] if !opts[:'mastering'].nil?
212
+ form_params["mastering_algorithm"] = opts[:'mastering_algorithm'] if !opts[:'mastering_algorithm'].nil?
213
+ form_params["noise_reduction"] = opts[:'noise_reduction'] if !opts[:'noise_reduction'].nil?
191
214
  form_params["preset"] = opts[:'preset'] if !opts[:'preset'].nil?
192
215
  form_params["target_loudness"] = opts[:'target_loudness'] if !opts[:'target_loudness'].nil?
216
+ form_params["target_loudness_mode"] = opts[:'target_loudness_mode'] if !opts[:'target_loudness_mode'].nil?
193
217
  form_params["mastering_matching_level"] = opts[:'mastering_matching_level'] if !opts[:'mastering_matching_level'].nil?
194
218
  form_params["mastering_reverb"] = opts[:'mastering_reverb'] if !opts[:'mastering_reverb'].nil?
195
219
  form_params["mastering_reverb_gain"] = opts[:'mastering_reverb_gain'] if !opts[:'mastering_reverb_gain'].nil?
196
220
  form_params["reference_audio_id"] = opts[:'reference_audio_id'] if !opts[:'reference_audio_id'].nil?
197
221
  form_params["low_cut_freq"] = opts[:'low_cut_freq'] if !opts[:'low_cut_freq'].nil?
198
222
  form_params["high_cut_freq"] = opts[:'high_cut_freq'] if !opts[:'high_cut_freq'].nil?
223
+ form_params["ceiling"] = opts[:'ceiling'] if !opts[:'ceiling'].nil?
224
+ form_params["ceiling_mode"] = opts[:'ceiling_mode'] if !opts[:'ceiling_mode'].nil?
225
+ form_params["oversample"] = opts[:'oversample'] if !opts[:'oversample'].nil?
199
226
  form_params["sample_rate"] = opts[:'sample_rate'] if !opts[:'sample_rate'].nil?
200
227
  form_params["bit_depth"] = opts[:'bit_depth'] if !opts[:'bit_depth'].nil?
201
228
  form_params["output_format"] = opts[:'output_format'] if !opts[:'output_format'].nil?
202
229
  form_params["for_preview"] = opts[:'for_preview'] if !opts[:'for_preview'].nil?
203
230
  form_params["start_at"] = opts[:'start_at'] if !opts[:'start_at'].nil?
204
231
  form_params["end_at"] = opts[:'end_at'] if !opts[:'end_at'].nil?
205
- form_params["is_bakuage"] = opts[:'is_bakuage'] if !opts[:'is_bakuage'].nil?
232
+ form_params["video_title"] = opts[:'video_title'] if !opts[:'video_title'].nil?
206
233
 
207
234
  # http body (model)
208
235
  post_body = nil
@@ -277,6 +304,63 @@ module Aimastering
277
304
  return data, status_code, headers
278
305
  end
279
306
 
307
+ # Free unlock a mastering by id.
308
+ #
309
+ # @param id Mastering id
310
+ # @param [Hash] opts the optional parameters
311
+ # @return [Mastering]
312
+ def free_unlock_mastering(id, opts = {})
313
+ data, _status_code, _headers = free_unlock_mastering_with_http_info(id, opts)
314
+ return data
315
+ end
316
+
317
+ # Free unlock a mastering by id.
318
+ #
319
+ # @param id Mastering id
320
+ # @param [Hash] opts the optional parameters
321
+ # @return [Array<(Mastering, Fixnum, Hash)>] Mastering data, response status code and response headers
322
+ def free_unlock_mastering_with_http_info(id, opts = {})
323
+ if @api_client.config.debugging
324
+ @api_client.config.logger.debug "Calling API: MasteringApi.free_unlock_mastering ..."
325
+ end
326
+ # verify the required parameter 'id' is set
327
+ if @api_client.config.client_side_validation && id.nil?
328
+ fail ArgumentError, "Missing the required parameter 'id' when calling MasteringApi.free_unlock_mastering"
329
+ end
330
+ if @api_client.config.client_side_validation && id < 1
331
+ fail ArgumentError, 'invalid value for "id" when calling MasteringApi.free_unlock_mastering, must be greater than or equal to 1.'
332
+ end
333
+
334
+ # resource path
335
+ local_var_path = "/masterings/{id}/free_unlock".sub('{' + 'id' + '}', id.to_s)
336
+
337
+ # query parameters
338
+ query_params = {}
339
+
340
+ # header parameters
341
+ header_params = {}
342
+ # HTTP header 'Accept' (if needed)
343
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
344
+
345
+ # form parameters
346
+ form_params = {}
347
+
348
+ # http body (model)
349
+ post_body = nil
350
+ auth_names = ['bearer']
351
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
352
+ :header_params => header_params,
353
+ :query_params => query_params,
354
+ :form_params => form_params,
355
+ :body => post_body,
356
+ :auth_names => auth_names,
357
+ :return_type => 'Mastering')
358
+ if @api_client.config.debugging
359
+ @api_client.config.logger.debug "API called: MasteringApi#free_unlock_mastering\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
360
+ end
361
+ return data, status_code, headers
362
+ end
363
+
280
364
  # Get a mastering by id.
281
365
  #
282
366
  # @param id Mastering id
@@ -592,5 +676,67 @@ module Aimastering
592
676
  end
593
677
  return data, status_code, headers
594
678
  end
679
+
680
+ # Update a mastering.
681
+ #
682
+ # @param id Mastering id
683
+ # @param [Hash] opts the optional parameters
684
+ # @option opts [BOOLEAN] :preserved Disable auto delete.
685
+ # @return [Mastering]
686
+ def update_mastering(id, opts = {})
687
+ data, _status_code, _headers = update_mastering_with_http_info(id, opts)
688
+ return data
689
+ end
690
+
691
+ # Update a mastering.
692
+ #
693
+ # @param id Mastering id
694
+ # @param [Hash] opts the optional parameters
695
+ # @option opts [BOOLEAN] :preserved Disable auto delete.
696
+ # @return [Array<(Mastering, Fixnum, Hash)>] Mastering data, response status code and response headers
697
+ def update_mastering_with_http_info(id, opts = {})
698
+ if @api_client.config.debugging
699
+ @api_client.config.logger.debug "Calling API: MasteringApi.update_mastering ..."
700
+ end
701
+ # verify the required parameter 'id' is set
702
+ if @api_client.config.client_side_validation && id.nil?
703
+ fail ArgumentError, "Missing the required parameter 'id' when calling MasteringApi.update_mastering"
704
+ end
705
+ if @api_client.config.client_side_validation && id < 1
706
+ fail ArgumentError, 'invalid value for "id" when calling MasteringApi.update_mastering, must be greater than or equal to 1.'
707
+ end
708
+
709
+ # resource path
710
+ local_var_path = "/masterings/{id}".sub('{' + 'id' + '}', id.to_s)
711
+
712
+ # query parameters
713
+ query_params = {}
714
+
715
+ # header parameters
716
+ header_params = {}
717
+ # HTTP header 'Accept' (if needed)
718
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
719
+ # HTTP header 'Content-Type'
720
+ header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
721
+
722
+ # form parameters
723
+ form_params = {}
724
+ form_params["preserved"] = opts[:'preserved'] if !opts[:'preserved'].nil?
725
+
726
+ # http body (model)
727
+ post_body = nil
728
+ auth_names = ['bearer']
729
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
730
+ :header_params => header_params,
731
+ :query_params => query_params,
732
+ :form_params => form_params,
733
+ :body => post_body,
734
+ :auth_names => auth_names,
735
+ :return_type => 'Mastering')
736
+ if @api_client.config.debugging
737
+ @api_client.config.logger.debug "API called: MasteringApi#update_mastering\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
738
+ end
739
+ return data, status_code, headers
740
+ end
595
741
  end
596
742
  end
@@ -4,7 +4,7 @@
4
4
  #This is a AI Mastering API document. You can use the mastering feature of [AI Mastering](https://aimastering.com) through this API.
5
5
 
6
6
  OpenAPI spec version: 1.0.0
7
- Contact: aimasteringcom@gmail.com
7
+ Contact: info@bakuage.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.3.1
10
10
 
@@ -4,7 +4,7 @@
4
4
  #This is a AI Mastering API document. You can use the mastering feature of [AI Mastering](https://aimastering.com) through this API.
5
5
 
6
6
  OpenAPI spec version: 1.0.0
7
- Contact: aimasteringcom@gmail.com
7
+ Contact: info@bakuage.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.3.1
10
10
 
@@ -4,7 +4,7 @@
4
4
  #This is a AI Mastering API document. You can use the mastering feature of [AI Mastering](https://aimastering.com) through this API.
5
5
 
6
6
  OpenAPI spec version: 1.0.0
7
- Contact: aimasteringcom@gmail.com
7
+ Contact: info@bakuage.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.3.1
10
10
 
@@ -0,0 +1,133 @@
1
+ =begin
2
+ #AI Mastering API
3
+
4
+ #This is a AI Mastering API document. You can use the mastering feature of [AI Mastering](https://aimastering.com) through this API.
5
+
6
+ OpenAPI spec version: 1.0.0
7
+ Contact: info@bakuage.com
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.3.1
10
+
11
+ =end
12
+
13
+ require "uri"
14
+
15
+ module Aimastering
16
+ class SpSubscriptionApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+
23
+ # Create a new smartphone subscription.
24
+ #
25
+ # @param service Service.
26
+ # @param [Hash] opts the optional parameters
27
+ # @option opts [String] :receipt Base64 encoded app store receipt. This parameter is effective only when the service is \&quot;appstore\&quot;.
28
+ # @return [SpSubscription]
29
+ def create_sp_subscription(service, opts = {})
30
+ data, _status_code, _headers = create_sp_subscription_with_http_info(service, opts)
31
+ return data
32
+ end
33
+
34
+ # Create a new smartphone subscription.
35
+ #
36
+ # @param service Service.
37
+ # @param [Hash] opts the optional parameters
38
+ # @option opts [String] :receipt Base64 encoded app store receipt. This parameter is effective only when the service is \&quot;appstore\&quot;.
39
+ # @return [Array<(SpSubscription, Fixnum, Hash)>] SpSubscription data, response status code and response headers
40
+ def create_sp_subscription_with_http_info(service, opts = {})
41
+ if @api_client.config.debugging
42
+ @api_client.config.logger.debug "Calling API: SpSubscriptionApi.create_sp_subscription ..."
43
+ end
44
+ # verify the required parameter 'service' is set
45
+ if @api_client.config.client_side_validation && service.nil?
46
+ fail ArgumentError, "Missing the required parameter 'service' when calling SpSubscriptionApi.create_sp_subscription"
47
+ end
48
+ # verify enum value
49
+ if @api_client.config.client_side_validation && !['appstore'].include?(service)
50
+ fail ArgumentError, "invalid value for 'service', must be one of appstore"
51
+ end
52
+ # resource path
53
+ local_var_path = "/sp_subscriptions"
54
+
55
+ # query parameters
56
+ query_params = {}
57
+
58
+ # header parameters
59
+ header_params = {}
60
+ # HTTP header 'Accept' (if needed)
61
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
62
+ # HTTP header 'Content-Type'
63
+ header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
64
+
65
+ # form parameters
66
+ form_params = {}
67
+ form_params["service"] = service
68
+ form_params["receipt"] = opts[:'receipt'] if !opts[:'receipt'].nil?
69
+
70
+ # http body (model)
71
+ post_body = nil
72
+ auth_names = ['bearer']
73
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
74
+ :header_params => header_params,
75
+ :query_params => query_params,
76
+ :form_params => form_params,
77
+ :body => post_body,
78
+ :auth_names => auth_names,
79
+ :return_type => 'SpSubscription')
80
+ if @api_client.config.debugging
81
+ @api_client.config.logger.debug "API called: SpSubscriptionApi#create_sp_subscription\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
82
+ end
83
+ return data, status_code, headers
84
+ end
85
+
86
+ # Get all accessable smartphone subscriptions.
87
+ #
88
+ # @param [Hash] opts the optional parameters
89
+ # @return [Array<SpSubscription>]
90
+ def list_sp_subscriptions(opts = {})
91
+ data, _status_code, _headers = list_sp_subscriptions_with_http_info(opts)
92
+ return data
93
+ end
94
+
95
+ # Get all accessable smartphone subscriptions.
96
+ #
97
+ # @param [Hash] opts the optional parameters
98
+ # @return [Array<(Array<SpSubscription>, Fixnum, Hash)>] Array<SpSubscription> data, response status code and response headers
99
+ def list_sp_subscriptions_with_http_info(opts = {})
100
+ if @api_client.config.debugging
101
+ @api_client.config.logger.debug "Calling API: SpSubscriptionApi.list_sp_subscriptions ..."
102
+ end
103
+ # resource path
104
+ local_var_path = "/sp_subscriptions"
105
+
106
+ # query parameters
107
+ query_params = {}
108
+
109
+ # header parameters
110
+ header_params = {}
111
+ # HTTP header 'Accept' (if needed)
112
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
113
+
114
+ # form parameters
115
+ form_params = {}
116
+
117
+ # http body (model)
118
+ post_body = nil
119
+ auth_names = ['bearer']
120
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
121
+ :header_params => header_params,
122
+ :query_params => query_params,
123
+ :form_params => form_params,
124
+ :body => post_body,
125
+ :auth_names => auth_names,
126
+ :return_type => 'Array<SpSubscription>')
127
+ if @api_client.config.debugging
128
+ @api_client.config.logger.debug "API called: SpSubscriptionApi#list_sp_subscriptions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
129
+ end
130
+ return data, status_code, headers
131
+ end
132
+ end
133
+ end