aimastering 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/Gemfile +7 -0
- data/README.md +167 -0
- data/Rakefile +8 -0
- data/aimastering.gemspec +45 -0
- data/docs/AccessToken.md +8 -0
- data/docs/AccessTokenApi.md +55 -0
- data/docs/AnonymizedMastering.md +29 -0
- data/docs/Audio.md +29 -0
- data/docs/AudioAnalysis.md +10 -0
- data/docs/AudioApi.md +374 -0
- data/docs/AudioDownloadToken.md +9 -0
- data/docs/Config.md +10 -0
- data/docs/ConfigApi.md +55 -0
- data/docs/ConfigAuth0.md +10 -0
- data/docs/ConfigPaypal.md +9 -0
- data/docs/ConfigStripe.md +8 -0
- data/docs/DateTime.md +7 -0
- data/docs/ExternalSearchApi.md +64 -0
- data/docs/ExternalSearchResult.md +9 -0
- data/docs/ExternalSearchResultItunes.md +18 -0
- data/docs/ExternalSearchResultYoutube.md +15 -0
- data/docs/JWT.md +7 -0
- data/docs/Kpi.md +7 -0
- data/docs/LibraryAudio.md +38 -0
- data/docs/LibraryAudioAnalysis.md +10 -0
- data/docs/LibraryAudioApi.md +378 -0
- data/docs/LibraryAudioLike.md +10 -0
- data/docs/Mastering.md +35 -0
- data/docs/MasteringApi.md +482 -0
- data/docs/Payment.md +14 -0
- data/docs/PaymentApi.md +224 -0
- data/docs/PaymentCustomer.md +11 -0
- data/docs/PaymentCustomerApi.md +55 -0
- data/docs/Plan.md +12 -0
- data/docs/PlanApi.md +55 -0
- data/docs/StatisticsApi.md +102 -0
- data/docs/Subscription.md +17 -0
- data/docs/SubscriptionApi.md +273 -0
- data/docs/User.md +14 -0
- data/docs/UserApi.md +111 -0
- data/docs/Video.md +13 -0
- data/docs/VideoApi.md +267 -0
- data/docs/VideoDownloadToken.md +9 -0
- data/git_push.sh +55 -0
- data/lib/aimastering.rb +77 -0
- data/lib/aimastering/api/access_token_api.rb +70 -0
- data/lib/aimastering/api/audio_api.rb +404 -0
- data/lib/aimastering/api/config_api.rb +70 -0
- data/lib/aimastering/api/external_search_api.rb +84 -0
- data/lib/aimastering/api/library_audio_api.rb +416 -0
- data/lib/aimastering/api/mastering_api.rb +596 -0
- data/lib/aimastering/api/payment_api.rb +263 -0
- data/lib/aimastering/api/payment_customer_api.rb +70 -0
- data/lib/aimastering/api/plan_api.rb +70 -0
- data/lib/aimastering/api/statistics_api.rb +117 -0
- data/lib/aimastering/api/subscription_api.rb +311 -0
- data/lib/aimastering/api/user_api.rb +125 -0
- data/lib/aimastering/api/video_api.rb +295 -0
- data/lib/aimastering/api_client.rb +389 -0
- data/lib/aimastering/api_error.rb +38 -0
- data/lib/aimastering/configuration.rb +209 -0
- data/lib/aimastering/models/access_token.rb +188 -0
- data/lib/aimastering/models/anonymized_mastering.rb +520 -0
- data/lib/aimastering/models/audio.rb +377 -0
- data/lib/aimastering/models/audio_analysis.rb +209 -0
- data/lib/aimastering/models/audio_download_token.rb +197 -0
- data/lib/aimastering/models/config.rb +206 -0
- data/lib/aimastering/models/config_auth0.rb +206 -0
- data/lib/aimastering/models/config_paypal.rb +197 -0
- data/lib/aimastering/models/config_stripe.rb +188 -0
- data/lib/aimastering/models/date_time.rb +179 -0
- data/lib/aimastering/models/external_search_result.rb +201 -0
- data/lib/aimastering/models/external_search_result_itunes.rb +278 -0
- data/lib/aimastering/models/external_search_result_youtube.rb +251 -0
- data/lib/aimastering/models/jwt.rb +179 -0
- data/lib/aimastering/models/kpi.rb +179 -0
- data/lib/aimastering/models/library_audio.rb +458 -0
- data/lib/aimastering/models/library_audio_analysis.rb +209 -0
- data/lib/aimastering/models/library_audio_like.rb +209 -0
- data/lib/aimastering/models/mastering.rb +587 -0
- data/lib/aimastering/models/payment.rb +275 -0
- data/lib/aimastering/models/payment_customer.rb +215 -0
- data/lib/aimastering/models/plan.rb +269 -0
- data/lib/aimastering/models/subscription.rb +302 -0
- data/lib/aimastering/models/user.rb +275 -0
- data/lib/aimastering/models/video.rb +233 -0
- data/lib/aimastering/models/video_download_token.rb +197 -0
- data/lib/aimastering/version.rb +15 -0
- data/spec/api/access_token_api_spec.rb +46 -0
- data/spec/api/audio_api_spec.rb +118 -0
- data/spec/api/config_api_spec.rb +46 -0
- data/spec/api/external_search_api_spec.rb +48 -0
- data/spec/api/library_audio_api_spec.rb +119 -0
- data/spec/api/mastering_api_spec.rb +154 -0
- data/spec/api/payment_api_spec.rb +85 -0
- data/spec/api/payment_customer_api_spec.rb +46 -0
- data/spec/api/plan_api_spec.rb +46 -0
- data/spec/api/statistics_api_spec.rb +57 -0
- data/spec/api/subscription_api_spec.rb +96 -0
- data/spec/api/user_api_spec.rb +59 -0
- data/spec/api/video_api_spec.rb +94 -0
- data/spec/api_client_spec.rb +226 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/models/access_token_spec.rb +42 -0
- data/spec/models/anonymized_mastering_spec.rb +192 -0
- data/spec/models/audio_analysis_spec.rb +54 -0
- data/spec/models/audio_download_token_spec.rb +48 -0
- data/spec/models/audio_spec.rb +168 -0
- data/spec/models/config_auth0_spec.rb +54 -0
- data/spec/models/config_paypal_spec.rb +48 -0
- data/spec/models/config_spec.rb +54 -0
- data/spec/models/config_stripe_spec.rb +42 -0
- data/spec/models/date_time_spec.rb +36 -0
- data/spec/models/external_search_result_itunes_spec.rb +102 -0
- data/spec/models/external_search_result_spec.rb +48 -0
- data/spec/models/external_search_result_youtube_spec.rb +84 -0
- data/spec/models/jwt_spec.rb +36 -0
- data/spec/models/kpi_spec.rb +36 -0
- data/spec/models/library_audio_analysis_spec.rb +54 -0
- data/spec/models/library_audio_like_spec.rb +54 -0
- data/spec/models/library_audio_spec.rb +222 -0
- data/spec/models/mastering_spec.rb +224 -0
- data/spec/models/payment_customer_spec.rb +60 -0
- data/spec/models/payment_spec.rb +82 -0
- data/spec/models/plan_spec.rb +74 -0
- data/spec/models/subscription_spec.rb +100 -0
- data/spec/models/user_spec.rb +82 -0
- data/spec/models/video_download_token_spec.rb +48 -0
- data/spec/models/video_spec.rb +72 -0
- data/spec/spec_helper.rb +111 -0
- metadata +397 -0
|
@@ -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: aimasteringcom@gmail.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 ConfigApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
# Get config.
|
|
24
|
+
#
|
|
25
|
+
# @param [Hash] opts the optional parameters
|
|
26
|
+
# @return [Config]
|
|
27
|
+
def get_config(opts = {})
|
|
28
|
+
data, _status_code, _headers = get_config_with_http_info(opts)
|
|
29
|
+
return data
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Get config.
|
|
33
|
+
#
|
|
34
|
+
# @param [Hash] opts the optional parameters
|
|
35
|
+
# @return [Array<(Config, Fixnum, Hash)>] Config data, response status code and response headers
|
|
36
|
+
def get_config_with_http_info(opts = {})
|
|
37
|
+
if @api_client.config.debugging
|
|
38
|
+
@api_client.config.logger.debug "Calling API: ConfigApi.get_config ..."
|
|
39
|
+
end
|
|
40
|
+
# resource path
|
|
41
|
+
local_var_path = "/config"
|
|
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 => 'Config')
|
|
64
|
+
if @api_client.config.debugging
|
|
65
|
+
@api_client.config.logger.debug "API called: ConfigApi#get_config\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
66
|
+
end
|
|
67
|
+
return data, status_code, headers
|
|
68
|
+
end
|
|
69
|
+
end
|
|
70
|
+
end
|
|
@@ -0,0 +1,84 @@
|
|
|
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: aimasteringcom@gmail.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 ExternalSearchApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
# Search external music and get name, url, thumbnails, etc.
|
|
24
|
+
#
|
|
25
|
+
# @param query Search query
|
|
26
|
+
# @param country Country ex. US, JP, etc
|
|
27
|
+
# @param [Hash] opts the optional parameters
|
|
28
|
+
# @return [ExternalSearchResult]
|
|
29
|
+
def search_external(query, country, opts = {})
|
|
30
|
+
data, _status_code, _headers = search_external_with_http_info(query, country, opts)
|
|
31
|
+
return data
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
# Search external music and get name, url, thumbnails, etc.
|
|
35
|
+
#
|
|
36
|
+
# @param query Search query
|
|
37
|
+
# @param country Country ex. US, JP, etc
|
|
38
|
+
# @param [Hash] opts the optional parameters
|
|
39
|
+
# @return [Array<(ExternalSearchResult, Fixnum, Hash)>] ExternalSearchResult data, response status code and response headers
|
|
40
|
+
def search_external_with_http_info(query, country, opts = {})
|
|
41
|
+
if @api_client.config.debugging
|
|
42
|
+
@api_client.config.logger.debug "Calling API: ExternalSearchApi.search_external ..."
|
|
43
|
+
end
|
|
44
|
+
# verify the required parameter 'query' is set
|
|
45
|
+
if @api_client.config.client_side_validation && query.nil?
|
|
46
|
+
fail ArgumentError, "Missing the required parameter 'query' when calling ExternalSearchApi.search_external"
|
|
47
|
+
end
|
|
48
|
+
# verify the required parameter 'country' is set
|
|
49
|
+
if @api_client.config.client_side_validation && country.nil?
|
|
50
|
+
fail ArgumentError, "Missing the required parameter 'country' when calling ExternalSearchApi.search_external"
|
|
51
|
+
end
|
|
52
|
+
# resource path
|
|
53
|
+
local_var_path = "/external_search"
|
|
54
|
+
|
|
55
|
+
# query parameters
|
|
56
|
+
query_params = {}
|
|
57
|
+
query_params[:'query'] = query
|
|
58
|
+
query_params[:'country'] = country
|
|
59
|
+
|
|
60
|
+
# header parameters
|
|
61
|
+
header_params = {}
|
|
62
|
+
# HTTP header 'Accept' (if needed)
|
|
63
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
64
|
+
|
|
65
|
+
# form parameters
|
|
66
|
+
form_params = {}
|
|
67
|
+
|
|
68
|
+
# http body (model)
|
|
69
|
+
post_body = nil
|
|
70
|
+
auth_names = ['bearer']
|
|
71
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
|
72
|
+
:header_params => header_params,
|
|
73
|
+
:query_params => query_params,
|
|
74
|
+
:form_params => form_params,
|
|
75
|
+
:body => post_body,
|
|
76
|
+
:auth_names => auth_names,
|
|
77
|
+
:return_type => 'ExternalSearchResult')
|
|
78
|
+
if @api_client.config.debugging
|
|
79
|
+
@api_client.config.logger.debug "API called: ExternalSearchApi#search_external\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
80
|
+
end
|
|
81
|
+
return data, status_code, headers
|
|
82
|
+
end
|
|
83
|
+
end
|
|
84
|
+
end
|
|
@@ -0,0 +1,416 @@
|
|
|
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: aimasteringcom@gmail.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 LibraryAudioApi
|
|
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 library audio.
|
|
24
|
+
#
|
|
25
|
+
# @param [Hash] opts the optional parameters
|
|
26
|
+
# @option opts [File] :file The file to upload.
|
|
27
|
+
# @return [LibraryAudio]
|
|
28
|
+
def create_library_audio(opts = {})
|
|
29
|
+
data, _status_code, _headers = create_library_audio_with_http_info(opts)
|
|
30
|
+
return data
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Create a new library audio.
|
|
34
|
+
#
|
|
35
|
+
# @param [Hash] opts the optional parameters
|
|
36
|
+
# @option opts [File] :file The file to upload.
|
|
37
|
+
# @return [Array<(LibraryAudio, Fixnum, Hash)>] LibraryAudio data, response status code and response headers
|
|
38
|
+
def create_library_audio_with_http_info(opts = {})
|
|
39
|
+
if @api_client.config.debugging
|
|
40
|
+
@api_client.config.logger.debug "Calling API: LibraryAudioApi.create_library_audio ..."
|
|
41
|
+
end
|
|
42
|
+
# resource path
|
|
43
|
+
local_var_path = "/library_audios"
|
|
44
|
+
|
|
45
|
+
# query parameters
|
|
46
|
+
query_params = {}
|
|
47
|
+
|
|
48
|
+
# header parameters
|
|
49
|
+
header_params = {}
|
|
50
|
+
# HTTP header 'Accept' (if needed)
|
|
51
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
52
|
+
# HTTP header 'Content-Type'
|
|
53
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
|
|
54
|
+
|
|
55
|
+
# form parameters
|
|
56
|
+
form_params = {}
|
|
57
|
+
form_params["file"] = opts[:'file'] if !opts[:'file'].nil?
|
|
58
|
+
|
|
59
|
+
# http body (model)
|
|
60
|
+
post_body = nil
|
|
61
|
+
auth_names = ['bearer']
|
|
62
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
|
63
|
+
:header_params => header_params,
|
|
64
|
+
:query_params => query_params,
|
|
65
|
+
:form_params => form_params,
|
|
66
|
+
:body => post_body,
|
|
67
|
+
:auth_names => auth_names,
|
|
68
|
+
:return_type => 'LibraryAudio')
|
|
69
|
+
if @api_client.config.debugging
|
|
70
|
+
@api_client.config.logger.debug "API called: LibraryAudioApi#create_library_audio\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
71
|
+
end
|
|
72
|
+
return data, status_code, headers
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
# Create a new library audio like.
|
|
76
|
+
#
|
|
77
|
+
# @param id Library audio id
|
|
78
|
+
# @param [Hash] opts the optional parameters
|
|
79
|
+
# @return [LibraryAudioLike]
|
|
80
|
+
def create_library_audio_like(id, opts = {})
|
|
81
|
+
data, _status_code, _headers = create_library_audio_like_with_http_info(id, opts)
|
|
82
|
+
return data
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
# Create a new library audio like.
|
|
86
|
+
#
|
|
87
|
+
# @param id Library audio id
|
|
88
|
+
# @param [Hash] opts the optional parameters
|
|
89
|
+
# @return [Array<(LibraryAudioLike, Fixnum, Hash)>] LibraryAudioLike data, response status code and response headers
|
|
90
|
+
def create_library_audio_like_with_http_info(id, opts = {})
|
|
91
|
+
if @api_client.config.debugging
|
|
92
|
+
@api_client.config.logger.debug "Calling API: LibraryAudioApi.create_library_audio_like ..."
|
|
93
|
+
end
|
|
94
|
+
# verify the required parameter 'id' is set
|
|
95
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
96
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling LibraryAudioApi.create_library_audio_like"
|
|
97
|
+
end
|
|
98
|
+
if @api_client.config.client_side_validation && id < 1
|
|
99
|
+
fail ArgumentError, 'invalid value for "id" when calling LibraryAudioApi.create_library_audio_like, must be greater than or equal to 1.'
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
# resource path
|
|
103
|
+
local_var_path = "/library_audios/{id}/like".sub('{' + 'id' + '}', id.to_s)
|
|
104
|
+
|
|
105
|
+
# query parameters
|
|
106
|
+
query_params = {}
|
|
107
|
+
|
|
108
|
+
# header parameters
|
|
109
|
+
header_params = {}
|
|
110
|
+
# HTTP header 'Accept' (if needed)
|
|
111
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
112
|
+
# HTTP header 'Content-Type'
|
|
113
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
|
|
114
|
+
|
|
115
|
+
# form parameters
|
|
116
|
+
form_params = {}
|
|
117
|
+
|
|
118
|
+
# http body (model)
|
|
119
|
+
post_body = nil
|
|
120
|
+
auth_names = ['bearer']
|
|
121
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
|
122
|
+
:header_params => header_params,
|
|
123
|
+
:query_params => query_params,
|
|
124
|
+
:form_params => form_params,
|
|
125
|
+
:body => post_body,
|
|
126
|
+
:auth_names => auth_names,
|
|
127
|
+
:return_type => 'LibraryAudioLike')
|
|
128
|
+
if @api_client.config.debugging
|
|
129
|
+
@api_client.config.logger.debug "API called: LibraryAudioApi#create_library_audio_like\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
130
|
+
end
|
|
131
|
+
return data, status_code, headers
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
# Delete library audio.
|
|
135
|
+
#
|
|
136
|
+
# @param id Library audio id
|
|
137
|
+
# @param [Hash] opts the optional parameters
|
|
138
|
+
# @return [LibraryAudio]
|
|
139
|
+
def delete_library_audio(id, opts = {})
|
|
140
|
+
data, _status_code, _headers = delete_library_audio_with_http_info(id, opts)
|
|
141
|
+
return data
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
# Delete library audio.
|
|
145
|
+
#
|
|
146
|
+
# @param id Library audio id
|
|
147
|
+
# @param [Hash] opts the optional parameters
|
|
148
|
+
# @return [Array<(LibraryAudio, Fixnum, Hash)>] LibraryAudio data, response status code and response headers
|
|
149
|
+
def delete_library_audio_with_http_info(id, opts = {})
|
|
150
|
+
if @api_client.config.debugging
|
|
151
|
+
@api_client.config.logger.debug "Calling API: LibraryAudioApi.delete_library_audio ..."
|
|
152
|
+
end
|
|
153
|
+
# verify the required parameter 'id' is set
|
|
154
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
155
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling LibraryAudioApi.delete_library_audio"
|
|
156
|
+
end
|
|
157
|
+
if @api_client.config.client_side_validation && id < 1
|
|
158
|
+
fail ArgumentError, 'invalid value for "id" when calling LibraryAudioApi.delete_library_audio, must be greater than or equal to 1.'
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
# resource path
|
|
162
|
+
local_var_path = "/library_audios/{id}".sub('{' + 'id' + '}', id.to_s)
|
|
163
|
+
|
|
164
|
+
# query parameters
|
|
165
|
+
query_params = {}
|
|
166
|
+
|
|
167
|
+
# header parameters
|
|
168
|
+
header_params = {}
|
|
169
|
+
# HTTP header 'Accept' (if needed)
|
|
170
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
171
|
+
# HTTP header 'Content-Type'
|
|
172
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
|
|
173
|
+
|
|
174
|
+
# form parameters
|
|
175
|
+
form_params = {}
|
|
176
|
+
|
|
177
|
+
# http body (model)
|
|
178
|
+
post_body = nil
|
|
179
|
+
auth_names = ['bearer']
|
|
180
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
|
181
|
+
:header_params => header_params,
|
|
182
|
+
:query_params => query_params,
|
|
183
|
+
:form_params => form_params,
|
|
184
|
+
:body => post_body,
|
|
185
|
+
:auth_names => auth_names,
|
|
186
|
+
:return_type => 'LibraryAudio')
|
|
187
|
+
if @api_client.config.debugging
|
|
188
|
+
@api_client.config.logger.debug "API called: LibraryAudioApi#delete_library_audio\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
189
|
+
end
|
|
190
|
+
return data, status_code, headers
|
|
191
|
+
end
|
|
192
|
+
|
|
193
|
+
# Get a library audio by id.
|
|
194
|
+
#
|
|
195
|
+
# @param id Library audio id
|
|
196
|
+
# @param [Hash] opts the optional parameters
|
|
197
|
+
# @return [LibraryAudio]
|
|
198
|
+
def get_library_audio(id, opts = {})
|
|
199
|
+
data, _status_code, _headers = get_library_audio_with_http_info(id, opts)
|
|
200
|
+
return data
|
|
201
|
+
end
|
|
202
|
+
|
|
203
|
+
# Get a library audio by id.
|
|
204
|
+
#
|
|
205
|
+
# @param id Library audio id
|
|
206
|
+
# @param [Hash] opts the optional parameters
|
|
207
|
+
# @return [Array<(LibraryAudio, Fixnum, Hash)>] LibraryAudio data, response status code and response headers
|
|
208
|
+
def get_library_audio_with_http_info(id, opts = {})
|
|
209
|
+
if @api_client.config.debugging
|
|
210
|
+
@api_client.config.logger.debug "Calling API: LibraryAudioApi.get_library_audio ..."
|
|
211
|
+
end
|
|
212
|
+
# verify the required parameter 'id' is set
|
|
213
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
214
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling LibraryAudioApi.get_library_audio"
|
|
215
|
+
end
|
|
216
|
+
if @api_client.config.client_side_validation && id < 1
|
|
217
|
+
fail ArgumentError, 'invalid value for "id" when calling LibraryAudioApi.get_library_audio, must be greater than or equal to 1.'
|
|
218
|
+
end
|
|
219
|
+
|
|
220
|
+
# resource path
|
|
221
|
+
local_var_path = "/library_audios/{id}".sub('{' + 'id' + '}', id.to_s)
|
|
222
|
+
|
|
223
|
+
# query parameters
|
|
224
|
+
query_params = {}
|
|
225
|
+
|
|
226
|
+
# header parameters
|
|
227
|
+
header_params = {}
|
|
228
|
+
# HTTP header 'Accept' (if needed)
|
|
229
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
230
|
+
|
|
231
|
+
# form parameters
|
|
232
|
+
form_params = {}
|
|
233
|
+
|
|
234
|
+
# http body (model)
|
|
235
|
+
post_body = nil
|
|
236
|
+
auth_names = ['bearer']
|
|
237
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
|
238
|
+
:header_params => header_params,
|
|
239
|
+
:query_params => query_params,
|
|
240
|
+
:form_params => form_params,
|
|
241
|
+
:body => post_body,
|
|
242
|
+
:auth_names => auth_names,
|
|
243
|
+
:return_type => 'LibraryAudio')
|
|
244
|
+
if @api_client.config.debugging
|
|
245
|
+
@api_client.config.logger.debug "API called: LibraryAudioApi#get_library_audio\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
246
|
+
end
|
|
247
|
+
return data, status_code, headers
|
|
248
|
+
end
|
|
249
|
+
|
|
250
|
+
# Get a library audio analysis by id.
|
|
251
|
+
#
|
|
252
|
+
# @param id Library audio id
|
|
253
|
+
# @param [Hash] opts the optional parameters
|
|
254
|
+
# @return [LibraryAudioAnalysis]
|
|
255
|
+
def get_library_audio_analysis(id, opts = {})
|
|
256
|
+
data, _status_code, _headers = get_library_audio_analysis_with_http_info(id, opts)
|
|
257
|
+
return data
|
|
258
|
+
end
|
|
259
|
+
|
|
260
|
+
# Get a library audio analysis by id.
|
|
261
|
+
#
|
|
262
|
+
# @param id Library audio id
|
|
263
|
+
# @param [Hash] opts the optional parameters
|
|
264
|
+
# @return [Array<(LibraryAudioAnalysis, Fixnum, Hash)>] LibraryAudioAnalysis data, response status code and response headers
|
|
265
|
+
def get_library_audio_analysis_with_http_info(id, opts = {})
|
|
266
|
+
if @api_client.config.debugging
|
|
267
|
+
@api_client.config.logger.debug "Calling API: LibraryAudioApi.get_library_audio_analysis ..."
|
|
268
|
+
end
|
|
269
|
+
# verify the required parameter 'id' is set
|
|
270
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
271
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling LibraryAudioApi.get_library_audio_analysis"
|
|
272
|
+
end
|
|
273
|
+
if @api_client.config.client_side_validation && id < 1
|
|
274
|
+
fail ArgumentError, 'invalid value for "id" when calling LibraryAudioApi.get_library_audio_analysis, must be greater than or equal to 1.'
|
|
275
|
+
end
|
|
276
|
+
|
|
277
|
+
# resource path
|
|
278
|
+
local_var_path = "/library_audios/{id}/analysis".sub('{' + 'id' + '}', id.to_s)
|
|
279
|
+
|
|
280
|
+
# query parameters
|
|
281
|
+
query_params = {}
|
|
282
|
+
|
|
283
|
+
# header parameters
|
|
284
|
+
header_params = {}
|
|
285
|
+
# HTTP header 'Accept' (if needed)
|
|
286
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
287
|
+
|
|
288
|
+
# form parameters
|
|
289
|
+
form_params = {}
|
|
290
|
+
|
|
291
|
+
# http body (model)
|
|
292
|
+
post_body = nil
|
|
293
|
+
auth_names = ['bearer']
|
|
294
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
|
295
|
+
:header_params => header_params,
|
|
296
|
+
:query_params => query_params,
|
|
297
|
+
:form_params => form_params,
|
|
298
|
+
:body => post_body,
|
|
299
|
+
:auth_names => auth_names,
|
|
300
|
+
:return_type => 'LibraryAudioAnalysis')
|
|
301
|
+
if @api_client.config.debugging
|
|
302
|
+
@api_client.config.logger.debug "API called: LibraryAudioApi#get_library_audio_analysis\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
303
|
+
end
|
|
304
|
+
return data, status_code, headers
|
|
305
|
+
end
|
|
306
|
+
|
|
307
|
+
# Get all library audios accessable.
|
|
308
|
+
#
|
|
309
|
+
# @param [Hash] opts the optional parameters
|
|
310
|
+
# @return [Array<LibraryAudio>]
|
|
311
|
+
def list_library_audios(opts = {})
|
|
312
|
+
data, _status_code, _headers = list_library_audios_with_http_info(opts)
|
|
313
|
+
return data
|
|
314
|
+
end
|
|
315
|
+
|
|
316
|
+
# Get all library audios accessable.
|
|
317
|
+
#
|
|
318
|
+
# @param [Hash] opts the optional parameters
|
|
319
|
+
# @return [Array<(Array<LibraryAudio>, Fixnum, Hash)>] Array<LibraryAudio> data, response status code and response headers
|
|
320
|
+
def list_library_audios_with_http_info(opts = {})
|
|
321
|
+
if @api_client.config.debugging
|
|
322
|
+
@api_client.config.logger.debug "Calling API: LibraryAudioApi.list_library_audios ..."
|
|
323
|
+
end
|
|
324
|
+
# resource path
|
|
325
|
+
local_var_path = "/library_audios"
|
|
326
|
+
|
|
327
|
+
# query parameters
|
|
328
|
+
query_params = {}
|
|
329
|
+
|
|
330
|
+
# header parameters
|
|
331
|
+
header_params = {}
|
|
332
|
+
# HTTP header 'Accept' (if needed)
|
|
333
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
334
|
+
|
|
335
|
+
# form parameters
|
|
336
|
+
form_params = {}
|
|
337
|
+
|
|
338
|
+
# http body (model)
|
|
339
|
+
post_body = nil
|
|
340
|
+
auth_names = ['bearer']
|
|
341
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
|
342
|
+
:header_params => header_params,
|
|
343
|
+
:query_params => query_params,
|
|
344
|
+
:form_params => form_params,
|
|
345
|
+
:body => post_body,
|
|
346
|
+
:auth_names => auth_names,
|
|
347
|
+
:return_type => 'Array<LibraryAudio>')
|
|
348
|
+
if @api_client.config.debugging
|
|
349
|
+
@api_client.config.logger.debug "API called: LibraryAudioApi#list_library_audios\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
350
|
+
end
|
|
351
|
+
return data, status_code, headers
|
|
352
|
+
end
|
|
353
|
+
|
|
354
|
+
# Update library audio.
|
|
355
|
+
#
|
|
356
|
+
# @param id Library audio id
|
|
357
|
+
# @param [Hash] opts the optional parameters
|
|
358
|
+
# @option opts [BOOLEAN] :is_public Whether the library audio is public.
|
|
359
|
+
# @return [LibraryAudio]
|
|
360
|
+
def update_library_audio(id, opts = {})
|
|
361
|
+
data, _status_code, _headers = update_library_audio_with_http_info(id, opts)
|
|
362
|
+
return data
|
|
363
|
+
end
|
|
364
|
+
|
|
365
|
+
# Update library audio.
|
|
366
|
+
#
|
|
367
|
+
# @param id Library audio id
|
|
368
|
+
# @param [Hash] opts the optional parameters
|
|
369
|
+
# @option opts [BOOLEAN] :is_public Whether the library audio is public.
|
|
370
|
+
# @return [Array<(LibraryAudio, Fixnum, Hash)>] LibraryAudio data, response status code and response headers
|
|
371
|
+
def update_library_audio_with_http_info(id, opts = {})
|
|
372
|
+
if @api_client.config.debugging
|
|
373
|
+
@api_client.config.logger.debug "Calling API: LibraryAudioApi.update_library_audio ..."
|
|
374
|
+
end
|
|
375
|
+
# verify the required parameter 'id' is set
|
|
376
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
377
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling LibraryAudioApi.update_library_audio"
|
|
378
|
+
end
|
|
379
|
+
if @api_client.config.client_side_validation && id < 1
|
|
380
|
+
fail ArgumentError, 'invalid value for "id" when calling LibraryAudioApi.update_library_audio, must be greater than or equal to 1.'
|
|
381
|
+
end
|
|
382
|
+
|
|
383
|
+
# resource path
|
|
384
|
+
local_var_path = "/library_audios/{id}".sub('{' + 'id' + '}', id.to_s)
|
|
385
|
+
|
|
386
|
+
# query parameters
|
|
387
|
+
query_params = {}
|
|
388
|
+
|
|
389
|
+
# header parameters
|
|
390
|
+
header_params = {}
|
|
391
|
+
# HTTP header 'Accept' (if needed)
|
|
392
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
393
|
+
# HTTP header 'Content-Type'
|
|
394
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
|
|
395
|
+
|
|
396
|
+
# form parameters
|
|
397
|
+
form_params = {}
|
|
398
|
+
form_params["is_public"] = opts[:'is_public'] if !opts[:'is_public'].nil?
|
|
399
|
+
|
|
400
|
+
# http body (model)
|
|
401
|
+
post_body = nil
|
|
402
|
+
auth_names = ['bearer']
|
|
403
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
|
404
|
+
:header_params => header_params,
|
|
405
|
+
:query_params => query_params,
|
|
406
|
+
:form_params => form_params,
|
|
407
|
+
:body => post_body,
|
|
408
|
+
:auth_names => auth_names,
|
|
409
|
+
:return_type => 'LibraryAudio')
|
|
410
|
+
if @api_client.config.debugging
|
|
411
|
+
@api_client.config.logger.debug "API called: LibraryAudioApi#update_library_audio\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
412
|
+
end
|
|
413
|
+
return data, status_code, headers
|
|
414
|
+
end
|
|
415
|
+
end
|
|
416
|
+
end
|