Class: CloudmersiveVideoApiClient::AudioApi
- Inherits:
-
Object
- Object
- CloudmersiveVideoApiClient::AudioApi
- Defined in:
- lib/cloudmersive-video-api-client/api/audio_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#audio_convert_to_aac(opts = {}) ⇒ String
Convert Audio File to AAC format.
-
#audio_convert_to_aac_with_http_info(opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Convert Audio File to AAC format.
-
#audio_convert_to_m4a(opts = {}) ⇒ String
Convert Audio File to M4A format.
-
#audio_convert_to_m4a_with_http_info(opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Convert Audio File to M4A format.
-
#audio_convert_to_mp3(opts = {}) ⇒ String
Convert Audio File to MP3 format.
-
#audio_convert_to_mp3_with_http_info(opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Convert Audio File to MP3 format.
-
#audio_convert_to_wav(opts = {}) ⇒ String
Convert Audio File to WAV format.
-
#audio_convert_to_wav_with_http_info(opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Convert Audio File to WAV format.
-
#initialize(api_client = ApiClient.default) ⇒ AudioApi
constructor
A new instance of AudioApi.
Constructor Details
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/cloudmersive-video-api-client/api/audio_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#audio_convert_to_aac(opts = {}) ⇒ String
Convert Audio File to AAC format. Automatically detect audio file format and convert it to AAC format. Supports many input audio formats, including AAC, FLAC, M4A, MP2, MP3, OGG, WMA, and WAV. Uses 1 API call per 10 MB of file size. Also uses 1 API call per additional minute of processing time over 5 minutes, up to a maximum of 25 minutes total processing time. Maximum output file size is 50GB.
29 30 31 32 |
# File 'lib/cloudmersive-video-api-client/api/audio_api.rb', line 29 def audio_convert_to_aac(opts = {}) data, _status_code, _headers = audio_convert_to_aac_with_http_info(opts) data end |
#audio_convert_to_aac_with_http_info(opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Convert Audio File to AAC format. Automatically detect audio file format and convert it to AAC format. Supports many input audio formats, including AAC, FLAC, M4A, MP2, MP3, OGG, WMA, and WAV. Uses 1 API call per 10 MB of file size. Also uses 1 API call per additional minute of processing time over 5 minutes, up to a maximum of 25 minutes total processing time. Maximum output file size is 50GB.
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/cloudmersive-video-api-client/api/audio_api.rb', line 41 def audio_convert_to_aac_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AudioApi.audio_convert_to_aac ...' end # resource path local_var_path = '/video/convert/to/aac' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data']) header_params[:'fileUrl'] = opts[:'file_url'] if !opts[:'file_url'].nil? header_params[:'bitRate'] = opts[:'bit_rate'] if !opts[:'bit_rate'].nil? # form parameters form_params = {} form_params['inputFile'] = opts[:'input_file'] if !opts[:'input_file'].nil? # http body (model) post_body = nil auth_names = ['Apikey'] 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 => 'String') if @api_client.config.debugging @api_client.config.logger.debug "API called: AudioApi#audio_convert_to_aac\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#audio_convert_to_m4a(opts = {}) ⇒ String
Convert Audio File to M4A format. Automatically detect audio file format and convert it to M4A format. Supports many input audio formats, including AAC, FLAC, M4A, MP2, MP3, OGG, WMA, and WAV. Uses 1 API call per 10 MB of file size. Also uses 1 API call per additional minute of processing time over 5 minutes, up to a maximum of 25 minutes total processing time. Maximum output file size is 50GB.
86 87 88 89 |
# File 'lib/cloudmersive-video-api-client/api/audio_api.rb', line 86 def audio_convert_to_m4a(opts = {}) data, _status_code, _headers = audio_convert_to_m4a_with_http_info(opts) data end |
#audio_convert_to_m4a_with_http_info(opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Convert Audio File to M4A format. Automatically detect audio file format and convert it to M4A format. Supports many input audio formats, including AAC, FLAC, M4A, MP2, MP3, OGG, WMA, and WAV. Uses 1 API call per 10 MB of file size. Also uses 1 API call per additional minute of processing time over 5 minutes, up to a maximum of 25 minutes total processing time. Maximum output file size is 50GB.
98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 |
# File 'lib/cloudmersive-video-api-client/api/audio_api.rb', line 98 def audio_convert_to_m4a_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AudioApi.audio_convert_to_m4a ...' end # resource path local_var_path = '/video/convert/to/m4a' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data']) header_params[:'fileUrl'] = opts[:'file_url'] if !opts[:'file_url'].nil? header_params[:'bitRate'] = opts[:'bit_rate'] if !opts[:'bit_rate'].nil? # form parameters form_params = {} form_params['inputFile'] = opts[:'input_file'] if !opts[:'input_file'].nil? # http body (model) post_body = nil auth_names = ['Apikey'] 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 => 'String') if @api_client.config.debugging @api_client.config.logger.debug "API called: AudioApi#audio_convert_to_m4a\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#audio_convert_to_mp3(opts = {}) ⇒ String
Convert Audio File to MP3 format. Automatically detect audio file format and convert it to MP3 format. Supports many input audio formats, including AAC, FLAC, M4A, MP2, MP3, OGG, WMA, and WAV. Uses 1 API call per 10 MB of file size. Also uses 1 API call per additional minute of processing time over 5 minutes, up to a maximum of 25 minutes total processing time. Maximum output file size is 50GB.
143 144 145 146 |
# File 'lib/cloudmersive-video-api-client/api/audio_api.rb', line 143 def audio_convert_to_mp3(opts = {}) data, _status_code, _headers = audio_convert_to_mp3_with_http_info(opts) data end |
#audio_convert_to_mp3_with_http_info(opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Convert Audio File to MP3 format. Automatically detect audio file format and convert it to MP3 format. Supports many input audio formats, including AAC, FLAC, M4A, MP2, MP3, OGG, WMA, and WAV. Uses 1 API call per 10 MB of file size. Also uses 1 API call per additional minute of processing time over 5 minutes, up to a maximum of 25 minutes total processing time. Maximum output file size is 50GB.
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 |
# File 'lib/cloudmersive-video-api-client/api/audio_api.rb', line 155 def audio_convert_to_mp3_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AudioApi.audio_convert_to_mp3 ...' end # resource path local_var_path = '/video/convert/to/mp3' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data']) header_params[:'fileUrl'] = opts[:'file_url'] if !opts[:'file_url'].nil? header_params[:'bitRate'] = opts[:'bit_rate'] if !opts[:'bit_rate'].nil? # form parameters form_params = {} form_params['inputFile'] = opts[:'input_file'] if !opts[:'input_file'].nil? # http body (model) post_body = nil auth_names = ['Apikey'] 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 => 'String') if @api_client.config.debugging @api_client.config.logger.debug "API called: AudioApi#audio_convert_to_mp3\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#audio_convert_to_wav(opts = {}) ⇒ String
Convert Audio File to WAV format. Automatically detect audio file format and convert it to WAV format. Supports many input audio formats, including AAC, FLAC, M4A, MP2, MP3, OGG, WMA, and WAV. Uses 1 API call per 10 MB of file size. Also uses 1 API call per additional minute of processing time over 5 minutes, up to a maximum of 25 minutes total processing time. Maximum output file size is 50GB.
200 201 202 203 |
# File 'lib/cloudmersive-video-api-client/api/audio_api.rb', line 200 def audio_convert_to_wav(opts = {}) data, _status_code, _headers = audio_convert_to_wav_with_http_info(opts) data end |
#audio_convert_to_wav_with_http_info(opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Convert Audio File to WAV format. Automatically detect audio file format and convert it to WAV format. Supports many input audio formats, including AAC, FLAC, M4A, MP2, MP3, OGG, WMA, and WAV. Uses 1 API call per 10 MB of file size. Also uses 1 API call per additional minute of processing time over 5 minutes, up to a maximum of 25 minutes total processing time. Maximum output file size is 50GB.
212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 |
# File 'lib/cloudmersive-video-api-client/api/audio_api.rb', line 212 def audio_convert_to_wav_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AudioApi.audio_convert_to_wav ...' end # resource path local_var_path = '/video/convert/to/wav' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data']) header_params[:'fileUrl'] = opts[:'file_url'] if !opts[:'file_url'].nil? header_params[:'sampleRate'] = opts[:'sample_rate'] if !opts[:'sample_rate'].nil? # form parameters form_params = {} form_params['inputFile'] = opts[:'input_file'] if !opts[:'input_file'].nil? # http body (model) post_body = nil auth_names = ['Apikey'] 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 => 'String') if @api_client.config.debugging @api_client.config.logger.debug "API called: AudioApi#audio_convert_to_wav\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |