Class: DropboxApi::Endpoints::Files::GetPreview

Inherits:
ContentDownload show all
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

Methods inherited from ContentDownload

#build_request, #initialize, #perform_request

Methods inherited from Base

add_endpoint

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

Parameters:

  • path (String)

    The path of the file to preview.



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