cloudmersive-video-api-client 2.0.1 → 2.0.2

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.
@@ -0,0 +1,55 @@
1
+ #!/bin/sh
2
+ #
3
+ # Generated by: https://github.com/swagger-api/swagger-codegen.git
4
+ #
5
+ # ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
6
+ #
7
+ # Usage example: /bin/sh ./git_push.sh wing328 swagger-petstore-perl "minor update"
8
+
9
+ git_user_id=$1
10
+ git_repo_id=$2
11
+ release_note=$3
12
+
13
+ if [ "$git_user_id" = "" ]; then
14
+ git_user_id="GIT_USER_ID"
15
+ echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
16
+ fi
17
+
18
+ if [ "$git_repo_id" = "" ]; then
19
+ git_repo_id="GIT_REPO_ID"
20
+ echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
21
+ fi
22
+
23
+ if [ "$release_note" = "" ]; then
24
+ release_note="Minor update"
25
+ echo "[INFO] No command line input provided. Set \$release_note to $release_note"
26
+ fi
27
+
28
+ # Initialize the local directory as a Git repository
29
+ git init
30
+
31
+ # Adds the files in the local repository and stages them for commit.
32
+ git add .
33
+
34
+ # Commits the tracked changes and prepares them to be pushed to a remote repository.
35
+ git commit -m "$release_note"
36
+
37
+ # Sets the new remote
38
+ git_remote=`git remote`
39
+ if [ "$git_remote" = "" ]; then # git remote not defined
40
+
41
+ if [ "$GIT_TOKEN" = "" ]; then
42
+ echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
43
+ git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git
44
+ else
45
+ git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git
46
+ fi
47
+
48
+ fi
49
+
50
+ git pull origin master
51
+
52
+ # Pushes (Forces) the changes in the local repository up to the remote repository
53
+ echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git"
54
+ git push origin master 2>&1 | grep -v 'To https'
55
+
@@ -0,0 +1,41 @@
1
+ =begin
2
+ #videoapi
3
+
4
+ #The video APIs help you convert, encode, and transcode videos.
5
+
6
+ OpenAPI spec version: v1
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.4.14
10
+
11
+ =end
12
+
13
+ # Common files
14
+ require 'cloudmersive-video-api-client/api_client'
15
+ require 'cloudmersive-video-api-client/api_error'
16
+ require 'cloudmersive-video-api-client/version'
17
+ require 'cloudmersive-video-api-client/configuration'
18
+
19
+ # Models
20
+ require 'cloudmersive-video-api-client/models/media_information'
21
+
22
+ # APIs
23
+ require 'cloudmersive-video-api-client/api/video_api'
24
+
25
+ module CloudmersiveVideoApiClient
26
+ class << self
27
+ # Customize default settings for the SDK using block.
28
+ # CloudmersiveVideoApiClient.configure do |config|
29
+ # config.username = "xxx"
30
+ # config.password = "xxx"
31
+ # end
32
+ # If no block given, return the default Configuration object.
33
+ def configure
34
+ if block_given?
35
+ yield(Configuration.default)
36
+ else
37
+ Configuration.default
38
+ end
39
+ end
40
+ end
41
+ end
@@ -0,0 +1,388 @@
1
+ =begin
2
+ #videoapi
3
+
4
+ #The video APIs help you convert, encode, and transcode videos.
5
+
6
+ OpenAPI spec version: v1
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.4.14
10
+
11
+ =end
12
+
13
+ require 'uri'
14
+
15
+ module CloudmersiveVideoApiClient
16
+ class VideoApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Convert Video to Animated GIF format.
23
+ # 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.
24
+ # @param input_file Input file to perform the operation on.
25
+ # @param [Hash] opts the optional parameters
26
+ # @option opts [String] :file_url Optional; URL of a video file being used for conversion. Use this option for files larger than 2GB.
27
+ # @option opts [Integer] :max_width Optional; Maximum width of the output video, up to the original video width. Defaults to 250 pixels.
28
+ # @option opts [Integer] :max_height Optional; Maximum height of the output video, up to the original video width. Defaults to 250 pixels.
29
+ # @option opts [BOOLEAN] :preserve_aspect_ratio Optional; If false, the original video&#39;s aspect ratio will not be preserved, allowing customization of the aspect ratio using maxWidth and maxHeight, potentially skewing the video. Default is true.
30
+ # @option opts [Integer] :frame_rate Optional; Specify the frame rate of the output video. Defaults to 24 frames per second.
31
+ # @option opts [BOOLEAN] :extend_processing_time Optional; If true, will allow additional processing time for the video file conversion, using one API call per additional minute over the 5 minute default processing time, up to a maximum of 25 total minutes. This is generally necessary for files larger than 500 MB or longer than 30 minutes.
32
+ # @option opts [DateTime] :start_time Optional; Specify the desired starting time of the GIF video in TimeSpan format.
33
+ # @option opts [DateTime] :time_span Optional; Specify the desired length of the GIF video in TimeSpan format. Limit is 30 minutes.
34
+ # @return [String]
35
+ def video_convert_to_gif(input_file, opts = {})
36
+ data, _status_code, _headers = video_convert_to_gif_with_http_info(input_file, opts)
37
+ data
38
+ end
39
+
40
+ # Convert Video to Animated GIF format.
41
+ # 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&#39;s aspect ratio.
42
+ # @param input_file Input file to perform the operation on.
43
+ # @param [Hash] opts the optional parameters
44
+ # @option opts [String] :file_url Optional; URL of a video file being used for conversion. Use this option for files larger than 2GB.
45
+ # @option opts [Integer] :max_width Optional; Maximum width of the output video, up to the original video width. Defaults to 250 pixels.
46
+ # @option opts [Integer] :max_height Optional; Maximum height of the output video, up to the original video width. Defaults to 250 pixels.
47
+ # @option opts [BOOLEAN] :preserve_aspect_ratio Optional; If false, the original video&#39;s aspect ratio will not be preserved, allowing customization of the aspect ratio using maxWidth and maxHeight, potentially skewing the video. Default is true.
48
+ # @option opts [Integer] :frame_rate Optional; Specify the frame rate of the output video. Defaults to 24 frames per second.
49
+ # @option opts [BOOLEAN] :extend_processing_time Optional; If true, will allow additional processing time for the video file conversion, using one API call per additional minute over the 5 minute default processing time, up to a maximum of 25 total minutes. This is generally necessary for files larger than 500 MB or longer than 30 minutes.
50
+ # @option opts [DateTime] :start_time Optional; Specify the desired starting time of the GIF video in TimeSpan format.
51
+ # @option opts [DateTime] :time_span Optional; Specify the desired length of the GIF video in TimeSpan format. Limit is 30 minutes.
52
+ # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
53
+ def video_convert_to_gif_with_http_info(input_file, opts = {})
54
+ if @api_client.config.debugging
55
+ @api_client.config.logger.debug 'Calling API: VideoApi.video_convert_to_gif ...'
56
+ end
57
+ # verify the required parameter 'input_file' is set
58
+ if @api_client.config.client_side_validation && input_file.nil?
59
+ fail ArgumentError, "Missing the required parameter 'input_file' when calling VideoApi.video_convert_to_gif"
60
+ end
61
+ # resource path
62
+ local_var_path = '/video/convert/to/gif'
63
+
64
+ # query parameters
65
+ query_params = {}
66
+
67
+ # header parameters
68
+ header_params = {}
69
+ # HTTP header 'Accept' (if needed)
70
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
71
+ # HTTP header 'Content-Type'
72
+ header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
73
+ header_params[:'fileUrl'] = opts[:'file_url'] if !opts[:'file_url'].nil?
74
+ header_params[:'maxWidth'] = opts[:'max_width'] if !opts[:'max_width'].nil?
75
+ header_params[:'maxHeight'] = opts[:'max_height'] if !opts[:'max_height'].nil?
76
+ header_params[:'preserveAspectRatio'] = opts[:'preserve_aspect_ratio'] if !opts[:'preserve_aspect_ratio'].nil?
77
+ header_params[:'frameRate'] = opts[:'frame_rate'] if !opts[:'frame_rate'].nil?
78
+ header_params[:'extendProcessingTime'] = opts[:'extend_processing_time'] if !opts[:'extend_processing_time'].nil?
79
+ header_params[:'startTime'] = opts[:'start_time'] if !opts[:'start_time'].nil?
80
+ header_params[:'timeSpan'] = opts[:'time_span'] if !opts[:'time_span'].nil?
81
+
82
+ # form parameters
83
+ form_params = {}
84
+ form_params['inputFile'] = input_file
85
+
86
+ # http body (model)
87
+ post_body = nil
88
+ auth_names = ['Apikey']
89
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
90
+ :header_params => header_params,
91
+ :query_params => query_params,
92
+ :form_params => form_params,
93
+ :body => post_body,
94
+ :auth_names => auth_names,
95
+ :return_type => 'String')
96
+ if @api_client.config.debugging
97
+ @api_client.config.logger.debug "API called: VideoApi#video_convert_to_gif\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
98
+ end
99
+ return data, status_code, headers
100
+ end
101
+ # Convert Video to MOV format.
102
+ # 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.
103
+ # @param input_file Input file to perform the operation on.
104
+ # @param [Hash] opts the optional parameters
105
+ # @option opts [String] :file_url Optional; URL of a video file being used for conversion. Use this option for files larger than 2GB.
106
+ # @option opts [Integer] :max_width Optional; Maximum width of the output video, up to the original video width. Defaults to original video width.
107
+ # @option opts [Integer] :max_height Optional; Maximum height of the output video, up to the original video width. Defaults to original video height.
108
+ # @option opts [BOOLEAN] :preserve_aspect_ratio Optional; If false, the original video&#39;s aspect ratio will not be preserved, allowing customization of the aspect ratio using maxWidth and maxHeight, potentially skewing the video. Default is true.
109
+ # @option opts [Integer] :frame_rate Optional; Specify the frame rate of the output video. Defaults to original video frame rate.
110
+ # @option opts [Integer] :quality Optional; Specify the quality of the output video, where 100 is lossless and 1 is the lowest possible quality with highest compression. Default is 50.
111
+ # @option opts [BOOLEAN] :extend_processing_time Optional; If true, will allow additional processing time for the video file conversion, using one API call per additional minute over the 5 minute default processing time, up to a maximum of 25 total minutes. This is generally necessary for files larger than 500 MB or longer than 30 minutes.
112
+ # @return [String]
113
+ def video_convert_to_mov(input_file, opts = {})
114
+ data, _status_code, _headers = video_convert_to_mov_with_http_info(input_file, opts)
115
+ data
116
+ end
117
+
118
+ # Convert Video to MOV format.
119
+ # 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.
120
+ # @param input_file Input file to perform the operation on.
121
+ # @param [Hash] opts the optional parameters
122
+ # @option opts [String] :file_url Optional; URL of a video file being used for conversion. Use this option for files larger than 2GB.
123
+ # @option opts [Integer] :max_width Optional; Maximum width of the output video, up to the original video width. Defaults to original video width.
124
+ # @option opts [Integer] :max_height Optional; Maximum height of the output video, up to the original video width. Defaults to original video height.
125
+ # @option opts [BOOLEAN] :preserve_aspect_ratio Optional; If false, the original video&#39;s aspect ratio will not be preserved, allowing customization of the aspect ratio using maxWidth and maxHeight, potentially skewing the video. Default is true.
126
+ # @option opts [Integer] :frame_rate Optional; Specify the frame rate of the output video. Defaults to original video frame rate.
127
+ # @option opts [Integer] :quality Optional; Specify the quality of the output video, where 100 is lossless and 1 is the lowest possible quality with highest compression. Default is 50.
128
+ # @option opts [BOOLEAN] :extend_processing_time Optional; If true, will allow additional processing time for the video file conversion, using one API call per additional minute over the 5 minute default processing time, up to a maximum of 25 total minutes. This is generally necessary for files larger than 500 MB or longer than 30 minutes.
129
+ # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
130
+ def video_convert_to_mov_with_http_info(input_file, opts = {})
131
+ if @api_client.config.debugging
132
+ @api_client.config.logger.debug 'Calling API: VideoApi.video_convert_to_mov ...'
133
+ end
134
+ # verify the required parameter 'input_file' is set
135
+ if @api_client.config.client_side_validation && input_file.nil?
136
+ fail ArgumentError, "Missing the required parameter 'input_file' when calling VideoApi.video_convert_to_mov"
137
+ end
138
+ # resource path
139
+ local_var_path = '/video/convert/to/mov'
140
+
141
+ # query parameters
142
+ query_params = {}
143
+
144
+ # header parameters
145
+ header_params = {}
146
+ # HTTP header 'Accept' (if needed)
147
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
148
+ # HTTP header 'Content-Type'
149
+ header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
150
+ header_params[:'fileUrl'] = opts[:'file_url'] if !opts[:'file_url'].nil?
151
+ header_params[:'maxWidth'] = opts[:'max_width'] if !opts[:'max_width'].nil?
152
+ header_params[:'maxHeight'] = opts[:'max_height'] if !opts[:'max_height'].nil?
153
+ header_params[:'preserveAspectRatio'] = opts[:'preserve_aspect_ratio'] if !opts[:'preserve_aspect_ratio'].nil?
154
+ header_params[:'frameRate'] = opts[:'frame_rate'] if !opts[:'frame_rate'].nil?
155
+ header_params[:'quality'] = opts[:'quality'] if !opts[:'quality'].nil?
156
+ header_params[:'extendProcessingTime'] = opts[:'extend_processing_time'] if !opts[:'extend_processing_time'].nil?
157
+
158
+ # form parameters
159
+ form_params = {}
160
+ form_params['inputFile'] = input_file
161
+
162
+ # http body (model)
163
+ post_body = nil
164
+ auth_names = ['Apikey']
165
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
166
+ :header_params => header_params,
167
+ :query_params => query_params,
168
+ :form_params => form_params,
169
+ :body => post_body,
170
+ :auth_names => auth_names,
171
+ :return_type => 'String')
172
+ if @api_client.config.debugging
173
+ @api_client.config.logger.debug "API called: VideoApi#video_convert_to_mov\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
174
+ end
175
+ return data, status_code, headers
176
+ end
177
+ # Convert Video to MP4 format.
178
+ # 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.
179
+ # @param input_file Input file to perform the operation on.
180
+ # @param [Hash] opts the optional parameters
181
+ # @option opts [String] :file_url Optional; URL of a video file being used for conversion. Use this option for files larger than 2GB.
182
+ # @option opts [Integer] :max_width Optional; Maximum width of the output video, up to the original video width. Defaults to original video width.
183
+ # @option opts [Integer] :max_height Optional; Maximum height of the output video, up to the original video width. Defaults to original video height.
184
+ # @option opts [BOOLEAN] :preserve_aspect_ratio Optional; If false, the original video&#39;s aspect ratio will not be preserved, allowing customization of the aspect ratio using maxWidth and maxHeight, potentially skewing the video. Default is true.
185
+ # @option opts [Integer] :frame_rate Optional; Specify the frame rate of the output video. Defaults to original video frame rate.
186
+ # @option opts [Integer] :quality Optional; Specify the quality of the output video, where 100 is lossless and 1 is the lowest possible quality with highest compression. Default is 50.
187
+ # @option opts [BOOLEAN] :extend_processing_time Optional; If true, will allow additional processing time for the video file conversion, using one API call per additional minute over the 5 minute default processing time, up to a maximum of 25 total minutes. This is generally necessary for files larger than 500 MB or longer than 30 minutes.
188
+ # @return [String]
189
+ def video_convert_to_mp4(input_file, opts = {})
190
+ data, _status_code, _headers = video_convert_to_mp4_with_http_info(input_file, opts)
191
+ data
192
+ end
193
+
194
+ # Convert Video to MP4 format.
195
+ # 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.
196
+ # @param input_file Input file to perform the operation on.
197
+ # @param [Hash] opts the optional parameters
198
+ # @option opts [String] :file_url Optional; URL of a video file being used for conversion. Use this option for files larger than 2GB.
199
+ # @option opts [Integer] :max_width Optional; Maximum width of the output video, up to the original video width. Defaults to original video width.
200
+ # @option opts [Integer] :max_height Optional; Maximum height of the output video, up to the original video width. Defaults to original video height.
201
+ # @option opts [BOOLEAN] :preserve_aspect_ratio Optional; If false, the original video&#39;s aspect ratio will not be preserved, allowing customization of the aspect ratio using maxWidth and maxHeight, potentially skewing the video. Default is true.
202
+ # @option opts [Integer] :frame_rate Optional; Specify the frame rate of the output video. Defaults to original video frame rate.
203
+ # @option opts [Integer] :quality Optional; Specify the quality of the output video, where 100 is lossless and 1 is the lowest possible quality with highest compression. Default is 50.
204
+ # @option opts [BOOLEAN] :extend_processing_time Optional; If true, will allow additional processing time for the video file conversion, using one API call per additional minute over the 5 minute default processing time, up to a maximum of 25 total minutes. This is generally necessary for files larger than 500 MB or longer than 30 minutes.
205
+ # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
206
+ def video_convert_to_mp4_with_http_info(input_file, opts = {})
207
+ if @api_client.config.debugging
208
+ @api_client.config.logger.debug 'Calling API: VideoApi.video_convert_to_mp4 ...'
209
+ end
210
+ # verify the required parameter 'input_file' is set
211
+ if @api_client.config.client_side_validation && input_file.nil?
212
+ fail ArgumentError, "Missing the required parameter 'input_file' when calling VideoApi.video_convert_to_mp4"
213
+ end
214
+ # resource path
215
+ local_var_path = '/video/convert/to/mp4'
216
+
217
+ # query parameters
218
+ query_params = {}
219
+
220
+ # header parameters
221
+ header_params = {}
222
+ # HTTP header 'Accept' (if needed)
223
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
224
+ # HTTP header 'Content-Type'
225
+ header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
226
+ header_params[:'fileUrl'] = opts[:'file_url'] if !opts[:'file_url'].nil?
227
+ header_params[:'maxWidth'] = opts[:'max_width'] if !opts[:'max_width'].nil?
228
+ header_params[:'maxHeight'] = opts[:'max_height'] if !opts[:'max_height'].nil?
229
+ header_params[:'preserveAspectRatio'] = opts[:'preserve_aspect_ratio'] if !opts[:'preserve_aspect_ratio'].nil?
230
+ header_params[:'frameRate'] = opts[:'frame_rate'] if !opts[:'frame_rate'].nil?
231
+ header_params[:'quality'] = opts[:'quality'] if !opts[:'quality'].nil?
232
+ header_params[:'extendProcessingTime'] = opts[:'extend_processing_time'] if !opts[:'extend_processing_time'].nil?
233
+
234
+ # form parameters
235
+ form_params = {}
236
+ form_params['inputFile'] = input_file
237
+
238
+ # http body (model)
239
+ post_body = nil
240
+ auth_names = ['Apikey']
241
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
242
+ :header_params => header_params,
243
+ :query_params => query_params,
244
+ :form_params => form_params,
245
+ :body => post_body,
246
+ :auth_names => auth_names,
247
+ :return_type => 'String')
248
+ if @api_client.config.debugging
249
+ @api_client.config.logger.debug "API called: VideoApi#video_convert_to_mp4\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
250
+ end
251
+ return data, status_code, headers
252
+ end
253
+ # Convert Video to WEBM format.
254
+ # 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.
255
+ # @param input_file Input file to perform the operation on.
256
+ # @param [Hash] opts the optional parameters
257
+ # @option opts [String] :file_url Optional; URL of a video file being used for conversion. Use this option for files larger than 2GB.
258
+ # @option opts [Integer] :max_width Optional; Maximum width of the output video, up to the original video width. Defaults to original video width.
259
+ # @option opts [Integer] :max_height Optional; Maximum height of the output video, up to the original video width. Defaults to original video height.
260
+ # @option opts [BOOLEAN] :preserve_aspect_ratio Optional; If false, the original video&#39;s aspect ratio will not be preserved, allowing customization of the aspect ratio using maxWidth and maxHeight, potentially skewing the video. Default is true.
261
+ # @option opts [Integer] :frame_rate Optional; Specify the frame rate of the output video. Defaults to original video frame rate.
262
+ # @option opts [Integer] :quality Optional; Specify the quality of the output video, where 100 is lossless and 1 is the lowest possible quality with highest compression. Default is 50.
263
+ # @option opts [BOOLEAN] :extend_processing_time Optional; If true, will allow additional processing time for the video file conversion, using one API call per additional minute over the 5 minute default processing time, up to a maximum of 25 total minutes. This is generally necessary for files larger than 500 MB or longer than 30 minutes.
264
+ # @return [String]
265
+ def video_convert_to_webm(input_file, opts = {})
266
+ data, _status_code, _headers = video_convert_to_webm_with_http_info(input_file, opts)
267
+ data
268
+ end
269
+
270
+ # Convert Video to WEBM format.
271
+ # 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.
272
+ # @param input_file Input file to perform the operation on.
273
+ # @param [Hash] opts the optional parameters
274
+ # @option opts [String] :file_url Optional; URL of a video file being used for conversion. Use this option for files larger than 2GB.
275
+ # @option opts [Integer] :max_width Optional; Maximum width of the output video, up to the original video width. Defaults to original video width.
276
+ # @option opts [Integer] :max_height Optional; Maximum height of the output video, up to the original video width. Defaults to original video height.
277
+ # @option opts [BOOLEAN] :preserve_aspect_ratio Optional; If false, the original video&#39;s aspect ratio will not be preserved, allowing customization of the aspect ratio using maxWidth and maxHeight, potentially skewing the video. Default is true.
278
+ # @option opts [Integer] :frame_rate Optional; Specify the frame rate of the output video. Defaults to original video frame rate.
279
+ # @option opts [Integer] :quality Optional; Specify the quality of the output video, where 100 is lossless and 1 is the lowest possible quality with highest compression. Default is 50.
280
+ # @option opts [BOOLEAN] :extend_processing_time Optional; If true, will allow additional processing time for the video file conversion, using one API call per additional minute over the 5 minute default processing time, up to a maximum of 25 total minutes. This is generally necessary for files larger than 500 MB or longer than 30 minutes.
281
+ # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
282
+ def video_convert_to_webm_with_http_info(input_file, opts = {})
283
+ if @api_client.config.debugging
284
+ @api_client.config.logger.debug 'Calling API: VideoApi.video_convert_to_webm ...'
285
+ end
286
+ # verify the required parameter 'input_file' is set
287
+ if @api_client.config.client_side_validation && input_file.nil?
288
+ fail ArgumentError, "Missing the required parameter 'input_file' when calling VideoApi.video_convert_to_webm"
289
+ end
290
+ # resource path
291
+ local_var_path = '/video/convert/to/webm'
292
+
293
+ # query parameters
294
+ query_params = {}
295
+
296
+ # header parameters
297
+ header_params = {}
298
+ # HTTP header 'Accept' (if needed)
299
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
300
+ # HTTP header 'Content-Type'
301
+ header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
302
+ header_params[:'fileUrl'] = opts[:'file_url'] if !opts[:'file_url'].nil?
303
+ header_params[:'maxWidth'] = opts[:'max_width'] if !opts[:'max_width'].nil?
304
+ header_params[:'maxHeight'] = opts[:'max_height'] if !opts[:'max_height'].nil?
305
+ header_params[:'preserveAspectRatio'] = opts[:'preserve_aspect_ratio'] if !opts[:'preserve_aspect_ratio'].nil?
306
+ header_params[:'frameRate'] = opts[:'frame_rate'] if !opts[:'frame_rate'].nil?
307
+ header_params[:'quality'] = opts[:'quality'] if !opts[:'quality'].nil?
308
+ header_params[:'extendProcessingTime'] = opts[:'extend_processing_time'] if !opts[:'extend_processing_time'].nil?
309
+
310
+ # form parameters
311
+ form_params = {}
312
+ form_params['inputFile'] = input_file
313
+
314
+ # http body (model)
315
+ post_body = nil
316
+ auth_names = ['Apikey']
317
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
318
+ :header_params => header_params,
319
+ :query_params => query_params,
320
+ :form_params => form_params,
321
+ :body => post_body,
322
+ :auth_names => auth_names,
323
+ :return_type => 'String')
324
+ if @api_client.config.debugging
325
+ @api_client.config.logger.debug "API called: VideoApi#video_convert_to_webm\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
326
+ end
327
+ return data, status_code, headers
328
+ end
329
+ # Get detailed information about a video or audio file
330
+ # 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.
331
+ # @param input_file Input file to perform the operation on.
332
+ # @param [Hash] opts the optional parameters
333
+ # @option opts [String] :file_url Optional; URL of a video file being used for conversion. Use this option for files larger than 2GB.
334
+ # @return [String]
335
+ def video_get_info(input_file, opts = {})
336
+ data, _status_code, _headers = video_get_info_with_http_info(input_file, opts)
337
+ data
338
+ end
339
+
340
+ # Get detailed information about a video or audio file
341
+ # 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.
342
+ # @param input_file Input file to perform the operation on.
343
+ # @param [Hash] opts the optional parameters
344
+ # @option opts [String] :file_url Optional; URL of a video file being used for conversion. Use this option for files larger than 2GB.
345
+ # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
346
+ def video_get_info_with_http_info(input_file, opts = {})
347
+ if @api_client.config.debugging
348
+ @api_client.config.logger.debug 'Calling API: VideoApi.video_get_info ...'
349
+ end
350
+ # verify the required parameter 'input_file' is set
351
+ if @api_client.config.client_side_validation && input_file.nil?
352
+ fail ArgumentError, "Missing the required parameter 'input_file' when calling VideoApi.video_get_info"
353
+ end
354
+ # resource path
355
+ local_var_path = '/video/convert/get-info'
356
+
357
+ # query parameters
358
+ query_params = {}
359
+
360
+ # header parameters
361
+ header_params = {}
362
+ # HTTP header 'Accept' (if needed)
363
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
364
+ # HTTP header 'Content-Type'
365
+ header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
366
+ header_params[:'fileUrl'] = opts[:'file_url'] if !opts[:'file_url'].nil?
367
+
368
+ # form parameters
369
+ form_params = {}
370
+ form_params['inputFile'] = input_file
371
+
372
+ # http body (model)
373
+ post_body = nil
374
+ auth_names = ['Apikey']
375
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
376
+ :header_params => header_params,
377
+ :query_params => query_params,
378
+ :form_params => form_params,
379
+ :body => post_body,
380
+ :auth_names => auth_names,
381
+ :return_type => 'String')
382
+ if @api_client.config.debugging
383
+ @api_client.config.logger.debug "API called: VideoApi#video_get_info\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
384
+ end
385
+ return data, status_code, headers
386
+ end
387
+ end
388
+ end