module ConvertApi

Constants

DEFAULT_URL_FORMAT
URI_REGEXP
VERSION

Public Instance Methods

client() click to toggle source
# File lib/convert_api.rb, line 34
def client
  Thread.current[:convert_api_client] ||= Client.new
end
config() click to toggle source
# File lib/convert_api.rb, line 22
def config
  @config ||= Configuration.new
end
configure() { |config| ... } click to toggle source
# File lib/convert_api.rb, line 18
def configure
  yield(config)
end
convert(to_format, params, from_format: nil, conversion_timeout: nil) click to toggle source
# File lib/convert_api.rb, line 26
def convert(to_format, params, from_format: nil, conversion_timeout: nil)
  Task.new(from_format, to_format, params, conversion_timeout: conversion_timeout).run
end
user() click to toggle source
# File lib/convert_api.rb, line 30
def user
  client.get('user')
end