lib/convert_api/task.rb in convert_api-2.0.0 vs lib/convert_api/task.rb in convert_api-3.0.0

- old
+ new

@@ -13,15 +13,13 @@ StoreFile: true, ) from_format = @from_format || detect_format(params) read_timeout = @conversion_timeout + config.conversion_timeout_delta if @conversion_timeout - converter = detect_converter(params) - converter_path = converter ? "/converter/#{converter}" : '' response = ConvertApi.client.post( - "convert/#{from_format}/to/#{@to_format}#{converter_path}", + "convert/#{from_format}/to/#{@to_format}", params, read_timeout: read_timeout, ) Result.new(response) @@ -66,17 +64,9 @@ return DEFAULT_URL_FORMAT if params[:Url] resource = params[:File] || Array(params[:Files]).first FormatDetector.new(resource, @to_format).run - end - - def detect_converter(params) - params.each do |key, value| - return value if key.to_s.downcase == 'converter' - end - - nil end def config ConvertApi.config end