Class: S3MediaServerApi::Media::Image
- Inherits:
-
CommonMediaApi
- Object
- CommonMediaApi
- S3MediaServerApi::Media::Image
- Defined in:
- lib/s3_media_server_api/media/image.rb
Defined Under Namespace
Classes: ImageObject
Constant Summary collapse
- IMAGE =
'image'
Class Method Summary collapse
-
.copy(uuid) ⇒ Object
copies image file parameters: uuid - uuid of file aduio - url of image file returns: response with copied image.
-
.resize(uuid) ⇒ Object
sends request to make thumb of image parameters: uuid - uuid of file.
Instance Method Summary collapse
Methods inherited from CommonMediaApi
#as_hash, create, create_from_path, custom_async_request, custom_sync_request, destroy, #exist?, #initialize, #name, resolve, #size, #uuid
Constructor Details
This class inherits a constructor from S3MediaServerApi::Media::CommonMediaApi
Class Method Details
.copy(uuid) ⇒ Object
copies image file parameters: uuid - uuid of file
aduio - url of image file
returns: response with copied image
44 45 46 |
# File 'lib/s3_media_server_api/media/image.rb', line 44 def copy(uuid) Image.new(custom_sync_request(:copy, uuid: uuid)) end |
.resize(uuid) ⇒ Object
sends request to make thumb of image parameters: uuid - uuid of file
51 52 53 |
# File 'lib/s3_media_server_api/media/image.rb', line 51 def resize(uuid) custom_async_request(:resize, uuid: uuid) end |
Instance Method Details
#source ⇒ Object
29 30 31 |
# File 'lib/s3_media_server_api/media/image.rb', line 29 def source ImageObject.new(@params[:source]) end |
#thumb ⇒ Object
33 34 35 |
# File 'lib/s3_media_server_api/media/image.rb', line 33 def thumb ImageObject.new(@params[:thumb]) end |