Class: Uploadcare::Entity::Conversion::BaseConverter
- Inherits:
-
Entity
- Object
- ApiStruct::Entity
- Entity
- Uploadcare::Entity::Conversion::BaseConverter
- Defined in:
- lib/uploadcare/entity/conversion/base_converter.rb
Overview
This serializer lets a user convert uploaded documents
Direct Known Subclasses
Class Method Summary collapse
-
.convert(params, options = {}) ⇒ Object
Converts files.
-
.info(uuid) ⇒ Object
Returns the document format and possible conversion formats.
-
.status(token) ⇒ Object
Returns a status of a conversion job.
Class Method Details
.convert(params, options = {}) ⇒ Object
Converts files
14 15 16 17 |
# File 'lib/uploadcare/entity/conversion/base_converter.rb', line 14 def convert(params, = {}) files_params = params.is_a?(Hash) ? [params] : params conversion_client.new.convert_many(files_params, ) end |
.info(uuid) ⇒ Object
Returns the document format and possible conversion formats.
29 30 31 |
# File 'lib/uploadcare/entity/conversion/base_converter.rb', line 29 def info(uuid) conversion_client.new.document_info(uuid) end |
.status(token) ⇒ Object
Returns a status of a conversion job
22 23 24 |
# File 'lib/uploadcare/entity/conversion/base_converter.rb', line 22 def status(token) conversion_client.new.get_conversion_status(token) end |