Module: Api2Convert

Defined in:
lib/api2convert.rb,
lib/api2convert.rb,
lib/api2convert/client.rb,
lib/api2convert/config.rb,
lib/api2convert/errors.rb,
lib/api2convert/result.rb,
lib/api2convert/version.rb,
lib/api2convert/model/job.rb,
lib/api2convert/input_type.rb,
lib/api2convert/job_status.rb,
lib/api2convert/http/request.rb,
lib/api2convert/model/preset.rb,
lib/api2convert/model/status.rb,
lib/api2convert/support/data.rb,
lib/api2convert/http/response.rb,
lib/api2convert/resource/jobs.rb,
lib/api2convert/webhook/event.rb,
lib/api2convert/http/transport.rb,
lib/api2convert/resource/stats.rb,
lib/api2convert/support/secret.rb,
lib/api2convert/model/conversion.rb,
lib/api2convert/model/input_file.rb,
lib/api2convert/resource/presets.rb,
lib/api2convert/webhook/verifier.rb,
lib/api2convert/model/job_message.rb,
lib/api2convert/model/output_file.rb,
lib/api2convert/resource/contracts.rb,
lib/api2convert/http/net_http_sender.rb,
lib/api2convert/resource/conversions.rb,
lib/api2convert/upload/file_uploader.rb,
lib/api2convert/upload/multipart_stream.rb

Overview

Official Ruby SDK for the API2Convert file-conversion API.

Convert, compress and transform images, documents, audio, video, ebooks, archives and CAD — and run operations like OCR, merge, thumbnail and website capture — in one line of code:

require "api2convert"

client = Api2Convert::Client.new("YOUR_API_KEY")
client.convert("invoice.docx", "pdf").save("invoice.pdf")

It is one of five official ports (PHP, Python, Java, Node.js, Ruby) that all implement the same language-agnostic contract in docs/SDK_CONTRACT.md.

Defined Under Namespace

Modules: Http, InputType, JobStatus, Model, Resource, Result, Support, Upload, Webhook Classes: ApiError, AuthenticationError, Client, Config, ConversionFailedError, ConversionTimeoutError, Error, NetworkError, NotFoundError, PaymentRequiredError, RateLimitError, ServerError, SignatureVerificationError, ValidationError

Constant Summary collapse

VERSION =

The SDK version. Kept in lock-step with the sibling SDKs (PHP, Python, Java, Node.js): all official ports implement the same docs/SDK_CONTRACT.md and version together.

"10.2.0"

Class Method Summary collapse

Class Method Details

.webhooksObject

Webhook verifier — usable without a configured client.

event = Api2Convert.webhooks.construct_event(raw_body, signature, secret)


59
60
61
# File 'lib/api2convert.rb', line 59

def self.webhooks
  Webhook::Verifier.new
end