Class: DropboxApi::Endpoints::Files::GetThumbnailBatch
- Inherits:
-
RpcContent
- Object
- Base
- Rpc
- RpcContent
- DropboxApi::Endpoints::Files::GetThumbnailBatch
- Includes:
- OptionsValidator
- Defined in:
- lib/dropbox_api/endpoints/files/get_thumbnail_batch.rb
Constant Summary collapse
- Method =
:post
- Path =
"/2/files/get_thumbnail_batch".freeze
- ResultType =
DropboxApi::Results::GetThumbnailBatchResult
- ErrorType =
DropboxApi::Errors::ThumbnailBatchError
Instance Method Summary collapse
- #build_entries_params(paths, options) ⇒ Object
-
#get_thumbnail_batch(paths, options = {}) ⇒ Object
Get a thumbnails for a batch of images.
Methods included from OptionsValidator
Methods inherited from RpcContent
Methods inherited from Rpc
#build_request, #initialize, #request_body
Methods inherited from Base
Constructor Details
This class inherits a constructor from DropboxApi::Endpoints::RpcContent
Instance Method Details
#build_entries_params(paths, options) ⇒ Object
31 32 33 34 35 |
# File 'lib/dropbox_api/endpoints/files/get_thumbnail_batch.rb', line 31 def build_entries_params(paths, ) paths.map do |path| .merge({ :path => path }) end end |
#get_thumbnail_batch(paths, options = {}) ⇒ Object
Get a thumbnails for a batch of images.
22 23 24 25 26 27 28 29 |
# File 'lib/dropbox_api/endpoints/files/get_thumbnail_batch.rb', line 22 add_endpoint :get_thumbnail_batch do |paths, = {}| ([:format, :size, :mode], ) [:format] ||= :jpeg [:size] ||= :w64h64 [:mode] ||= :strict perform_request :entries => build_entries_params(paths, ) end |