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'
- 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
32 33 34 35 36 |
# File 'lib/dropbox_api/endpoints/files/get_thumbnail_batch.rb', line 32 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.
23 24 25 26 27 28 29 30 |
# File 'lib/dropbox_api/endpoints/files/get_thumbnail_batch.rb', line 23 add_endpoint :get_thumbnail_batch do |paths, = {}| ([:format, :size, :mode], ) [:format] ||= :jpeg [:size] ||= :w64h64 [:mode] ||= :strict perform_request entries: build_entries_params(paths, ) end |