Class: CloudmersiveVideoApiClient::VideoApi
- Inherits:
-
Object
- Object
- CloudmersiveVideoApiClient::VideoApi
- Defined in:
- lib/cloudmersive-video-api-client/api/video_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#initialize(api_client = ApiClient.default) ⇒ VideoApi
constructor
A new instance of VideoApi.
-
#video_convert_to_gif(input_file, opts = {}) ⇒ String
Convert Video to Animated GIF format.
-
#video_convert_to_gif_with_http_info(input_file, opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Convert Video to Animated GIF format.
-
#video_convert_to_mov(input_file, opts = {}) ⇒ String
Convert Video to MOV format.
-
#video_convert_to_mov_with_http_info(input_file, opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Convert Video to MOV format.
-
#video_convert_to_mp4(input_file, opts = {}) ⇒ String
Convert Video to MP4 format.
-
#video_convert_to_mp4_with_http_info(input_file, opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Convert Video to MP4 format.
-
#video_convert_to_webm(input_file, opts = {}) ⇒ String
Convert Video to WEBM format.
-
#video_convert_to_webm_with_http_info(input_file, opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Convert Video to WEBM format.
-
#video_get_info(input_file, opts = {}) ⇒ String
Get detailed information about a video or audio file Retrieve detailed information about a video or audio file, including format, dimensions, file size, bit rate, duration and start time.
-
#video_get_info_with_http_info(input_file, opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Get detailed information about a video or audio file Retrieve detailed information about a video or audio file, including format, dimensions, file size, bit rate, duration and start time.
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/video_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#video_convert_to_gif(input_file, opts = {}) ⇒ String
Convert Video to Animated GIF format. Automatically detect video file format and convert it to animated GIF format. Supports many input video formats, including AVI, ASF, FLV, MP4, MPEG/MPG, Matroska/WEBM, 3G2, OGV, MKV, M4V and MOV. Uses 1 API call per 10 MB of file size. Maximum output file size is 50GB. Default height is 250 pixels, while preserving the video’s aspect ratio.
35 36 37 38 |
# File 'lib/cloudmersive-video-api-client/api/video_api.rb', line 35 def video_convert_to_gif(input_file, opts = {}) data, _status_code, _headers = video_convert_to_gif_with_http_info(input_file, opts) data end |
#video_convert_to_gif_with_http_info(input_file, opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Convert Video to Animated GIF format. Automatically detect video file format and convert it to animated GIF format. Supports many input video formats, including AVI, ASF, FLV, MP4, MPEG/MPG, Matroska/WEBM, 3G2, OGV, MKV, M4V and MOV. Uses 1 API call per 10 MB of file size. Maximum output file size is 50GB. Default height is 250 pixels, while preserving the video's aspect ratio.
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 |
# File 'lib/cloudmersive-video-api-client/api/video_api.rb', line 53 def video_convert_to_gif_with_http_info(input_file, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: VideoApi.video_convert_to_gif ...' end # verify the required parameter 'input_file' is set if @api_client.config.client_side_validation && input_file.nil? fail ArgumentError, "Missing the required parameter 'input_file' when calling VideoApi.video_convert_to_gif" end # resource path local_var_path = '/video/convert/to/gif' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml']) # 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[:'maxWidth'] = opts[:'max_width'] if !opts[:'max_width'].nil? header_params[:'maxHeight'] = opts[:'max_height'] if !opts[:'max_height'].nil? header_params[:'preserveAspectRatio'] = opts[:'preserve_aspect_ratio'] if !opts[:'preserve_aspect_ratio'].nil? header_params[:'frameRate'] = opts[:'frame_rate'] if !opts[:'frame_rate'].nil? header_params[:'extendProcessingTime'] = opts[:'extend_processing_time'] if !opts[:'extend_processing_time'].nil? header_params[:'startTime'] = opts[:'start_time'] if !opts[:'start_time'].nil? header_params[:'timeSpan'] = opts[:'time_span'] if !opts[:'time_span'].nil? # form parameters form_params = {} form_params['inputFile'] = input_file # 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: VideoApi#video_convert_to_gif\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#video_convert_to_mov(input_file, opts = {}) ⇒ String
Convert Video to MOV format. Automatically detect video file format and convert it to MOV format. Supports many input video formats, including AVI, ASF, FLV, MP4, MPEG/MPG, Matroska/WEBM, 3G2, OGV, MKV, M4V and MOV. Uses 1 API call per 10 MB of file size. Maximum output file size is 50GB.
113 114 115 116 |
# File 'lib/cloudmersive-video-api-client/api/video_api.rb', line 113 def video_convert_to_mov(input_file, opts = {}) data, _status_code, _headers = video_convert_to_mov_with_http_info(input_file, opts) data end |
#video_convert_to_mov_with_http_info(input_file, opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Convert Video to MOV format. Automatically detect video file format and convert it to MOV format. Supports many input video formats, including AVI, ASF, FLV, MP4, MPEG/MPG, Matroska/WEBM, 3G2, OGV, MKV, M4V and MOV. Uses 1 API call per 10 MB of file size. Maximum output file size is 50GB.
130 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 |
# File 'lib/cloudmersive-video-api-client/api/video_api.rb', line 130 def video_convert_to_mov_with_http_info(input_file, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: VideoApi.video_convert_to_mov ...' end # verify the required parameter 'input_file' is set if @api_client.config.client_side_validation && input_file.nil? fail ArgumentError, "Missing the required parameter 'input_file' when calling VideoApi.video_convert_to_mov" end # resource path local_var_path = '/video/convert/to/mov' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml']) # 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[:'maxWidth'] = opts[:'max_width'] if !opts[:'max_width'].nil? header_params[:'maxHeight'] = opts[:'max_height'] if !opts[:'max_height'].nil? header_params[:'preserveAspectRatio'] = opts[:'preserve_aspect_ratio'] if !opts[:'preserve_aspect_ratio'].nil? header_params[:'frameRate'] = opts[:'frame_rate'] if !opts[:'frame_rate'].nil? header_params[:'quality'] = opts[:'quality'] if !opts[:'quality'].nil? header_params[:'extendProcessingTime'] = opts[:'extend_processing_time'] if !opts[:'extend_processing_time'].nil? # form parameters form_params = {} form_params['inputFile'] = input_file # 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: VideoApi#video_convert_to_mov\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#video_convert_to_mp4(input_file, opts = {}) ⇒ String
Convert Video to MP4 format. Automatically detect video file format and convert it to MP4 format. Supports many input video formats, including AVI, ASF, FLV, MP4, MPEG/MPG, Matroska/WEBM, 3G2, OGV, MKV, M4V and MOV. Uses 1 API call per 10 MB of file size. Maximum output file size is 50GB.
189 190 191 192 |
# File 'lib/cloudmersive-video-api-client/api/video_api.rb', line 189 def video_convert_to_mp4(input_file, opts = {}) data, _status_code, _headers = video_convert_to_mp4_with_http_info(input_file, opts) data end |
#video_convert_to_mp4_with_http_info(input_file, opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Convert Video to MP4 format. Automatically detect video file format and convert it to MP4 format. Supports many input video formats, including AVI, ASF, FLV, MP4, MPEG/MPG, Matroska/WEBM, 3G2, OGV, MKV, M4V and MOV. Uses 1 API call per 10 MB of file size. Maximum output file size is 50GB.
206 207 208 209 210 211 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 250 251 252 |
# File 'lib/cloudmersive-video-api-client/api/video_api.rb', line 206 def video_convert_to_mp4_with_http_info(input_file, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: VideoApi.video_convert_to_mp4 ...' end # verify the required parameter 'input_file' is set if @api_client.config.client_side_validation && input_file.nil? fail ArgumentError, "Missing the required parameter 'input_file' when calling VideoApi.video_convert_to_mp4" end # resource path local_var_path = '/video/convert/to/mp4' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml']) # 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[:'maxWidth'] = opts[:'max_width'] if !opts[:'max_width'].nil? header_params[:'maxHeight'] = opts[:'max_height'] if !opts[:'max_height'].nil? header_params[:'preserveAspectRatio'] = opts[:'preserve_aspect_ratio'] if !opts[:'preserve_aspect_ratio'].nil? header_params[:'frameRate'] = opts[:'frame_rate'] if !opts[:'frame_rate'].nil? header_params[:'quality'] = opts[:'quality'] if !opts[:'quality'].nil? header_params[:'extendProcessingTime'] = opts[:'extend_processing_time'] if !opts[:'extend_processing_time'].nil? # form parameters form_params = {} form_params['inputFile'] = input_file # 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: VideoApi#video_convert_to_mp4\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#video_convert_to_webm(input_file, opts = {}) ⇒ String
Convert Video to WEBM format. Automatically detect video file format and convert it to WEBM format. Supports many input video formats, including AVI, ASF, FLV, MP4, MPEG/MPG, Matroska/WEBM, 3G2, OGV, MKV, M4V and MOV. Uses 1 API call per 10 MB of file size. Maximum output file size is 50GB.
265 266 267 268 |
# File 'lib/cloudmersive-video-api-client/api/video_api.rb', line 265 def video_convert_to_webm(input_file, opts = {}) data, _status_code, _headers = video_convert_to_webm_with_http_info(input_file, opts) data end |
#video_convert_to_webm_with_http_info(input_file, opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Convert Video to WEBM format. Automatically detect video file format and convert it to WEBM format. Supports many input video formats, including AVI, ASF, FLV, MP4, MPEG/MPG, Matroska/WEBM, 3G2, OGV, MKV, M4V and MOV. Uses 1 API call per 10 MB of file size. Maximum output file size is 50GB.
282 283 284 285 286 287 288 289 290 291 292 293 294 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 |
# File 'lib/cloudmersive-video-api-client/api/video_api.rb', line 282 def video_convert_to_webm_with_http_info(input_file, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: VideoApi.video_convert_to_webm ...' end # verify the required parameter 'input_file' is set if @api_client.config.client_side_validation && input_file.nil? fail ArgumentError, "Missing the required parameter 'input_file' when calling VideoApi.video_convert_to_webm" end # resource path local_var_path = '/video/convert/to/webm' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml']) # 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[:'maxWidth'] = opts[:'max_width'] if !opts[:'max_width'].nil? header_params[:'maxHeight'] = opts[:'max_height'] if !opts[:'max_height'].nil? header_params[:'preserveAspectRatio'] = opts[:'preserve_aspect_ratio'] if !opts[:'preserve_aspect_ratio'].nil? header_params[:'frameRate'] = opts[:'frame_rate'] if !opts[:'frame_rate'].nil? header_params[:'quality'] = opts[:'quality'] if !opts[:'quality'].nil? header_params[:'extendProcessingTime'] = opts[:'extend_processing_time'] if !opts[:'extend_processing_time'].nil? # form parameters form_params = {} form_params['inputFile'] = input_file # 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: VideoApi#video_convert_to_webm\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#video_get_info(input_file, opts = {}) ⇒ String
Get detailed information about a video or audio file Retrieve detailed information about a video or audio file, including format, dimensions, file size, bit rate, duration and start time. Compatible with many formats, including: AVI, ASF, FLV, GIF, MP4, MPEG/MPG, Matroska/WEBM, MOV, AIFF, ASF, CAF, MP3, MP2, MP1, Ogg, OMG/OMA, and WAV. Uses 1 API call per 10 MB of file size.
335 336 337 338 |
# File 'lib/cloudmersive-video-api-client/api/video_api.rb', line 335 def video_get_info(input_file, opts = {}) data, _status_code, _headers = video_get_info_with_http_info(input_file, opts) data end |
#video_get_info_with_http_info(input_file, opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Get detailed information about a video or audio file Retrieve detailed information about a video or audio file, including format, dimensions, file size, bit rate, duration and start time. Compatible with many formats, including: AVI, ASF, FLV, GIF, MP4, MPEG/MPG, Matroska/WEBM, MOV, AIFF, ASF, CAF, MP3, MP2, MP1, Ogg, OMG/OMA, and WAV. Uses 1 API call per 10 MB of file size.
346 347 348 349 350 351 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 |
# File 'lib/cloudmersive-video-api-client/api/video_api.rb', line 346 def video_get_info_with_http_info(input_file, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: VideoApi.video_get_info ...' end # verify the required parameter 'input_file' is set if @api_client.config.client_side_validation && input_file.nil? fail ArgumentError, "Missing the required parameter 'input_file' when calling VideoApi.video_get_info" end # resource path local_var_path = '/video/convert/get-info' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml']) # 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? # form parameters form_params = {} form_params['inputFile'] = input_file # 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: VideoApi#video_get_info\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |