Class: DropboxApi::Endpoints::Files::GetThumbnail
- Inherits:
-
ContentDownload
- Object
- Base
- ContentDownload
- DropboxApi::Endpoints::Files::GetThumbnail
- Includes:
- OptionsValidator
- Defined in:
- lib/dropbox_api/endpoints/files/get_thumbnail.rb
Constant Summary collapse
- Method =
:post
- Path =
"/2/files/get_thumbnail".freeze
- ResultType =
DropboxApi::Metadata::File
- ErrorType =
DropboxApi::Errors::PreviewError
Instance Method Summary collapse
-
#get_thumbnail(path, options = {}, &block) ⇒ Object
Get a thumbnail for an image.
Methods included from OptionsValidator
Methods inherited from ContentDownload
#build_request, #initialize, #perform_request
Methods inherited from Base
Constructor Details
This class inherits a constructor from DropboxApi::Endpoints::ContentDownload
Instance Method Details
#get_thumbnail(path, options = {}, &block) ⇒ Object
Get a thumbnail for an image.
This method currently supports files with the following file extensions: jpg, jpeg, png, tiff, tif, gif and bmp. Photos that are larger than 20MB in size won't be converted to a thumbnail.
47 48 49 50 51 52 53 54 55 |
# File 'lib/dropbox_api/endpoints/files/get_thumbnail.rb', line 47 add_endpoint :get_thumbnail do |path, = {}, &block| ([:format, :size], ) [:format] ||= :jpeg [:size] ||= :w64h64 perform_request(.merge({ :path => path }), &block) end |