Method: ConvertApi::Task#run
- Defined in:
- lib/convert_api/task.rb
#run ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/convert_api/task.rb', line 10 def run params = normalize_params(@params).merge( Timeout: @conversion_timeout, StoreFile: true, ) from_format = @from_format || detect_format(params) read_timeout = @conversion_timeout + config.conversion_timeout_delta if @conversion_timeout response = ConvertApi.client.post( "convert/#{from_format}/to/#{@to_format}", params, read_timeout: read_timeout, ) Result.new(response) end |