Class: DropboxApi::Endpoints::Files::GetPreview
- Inherits:
-
ContentDownload
- Object
- Base
- ContentDownload
- DropboxApi::Endpoints::Files::GetPreview
- Defined in:
- lib/dropbox_api/endpoints/files/get_preview.rb
Constant Summary collapse
- Method =
:post
- Path =
"/2/files/get_preview".freeze
- ResultType =
DropboxApi::Metadata::File
- ErrorType =
DropboxApi::Errors::PreviewError
Instance Method Summary collapse
-
#get_preview(path, &block) ⇒ Object
Get a preview for a file.
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_preview(path, &block) ⇒ Object
Get a preview for a file. Currently previews are only generated for the files with the following extensions: .doc, .docx, .docm, .ppt, .pps, .ppsx, .ppsm, .pptx, .pptm, .xls, .xlsx, .xlsm, .rtf
13 14 15 |
# File 'lib/dropbox_api/endpoints/files/get_preview.rb', line 13 add_endpoint :get_preview do |path, &block| perform_request({:path => path}, &block) end |