Sha256: 2b315362ecb399ea7a988f2df60537b6332b4c842bfcbe2dce9c32109514533b

Contents?: true

Size: 656 Bytes

Versions: 14

Compression:

Stored size: 656 Bytes

Contents

module DropboxApi::Endpoints::Files
  class GetPreview < DropboxApi::Endpoints::ContentDownload
    Method      = :post
    Path        = "/2/files/get_preview".freeze
    ResultType  = DropboxApi::Metadata::File
    ErrorType   = DropboxApi::Errors::PreviewError

    # 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
    #
    # @param path [String] The path of the file to preview.
    add_endpoint :get_preview do |path, &block|
      perform_request({:path => path}, &block)
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
dropbox_api-0.1.18 lib/dropbox_api/endpoints/files/get_preview.rb
dropbox_api-0.1.17 lib/dropbox_api/endpoints/files/get_preview.rb
dropbox_api-0.1.16 lib/dropbox_api/endpoints/files/get_preview.rb
dropbox_api-0.1.15 lib/dropbox_api/endpoints/files/get_preview.rb
dropbox_api-0.1.14 lib/dropbox_api/endpoints/files/get_preview.rb
dropbox_api-0.1.13 lib/dropbox_api/endpoints/files/get_preview.rb
dropbox_api-0.1.12 lib/dropbox_api/endpoints/files/get_preview.rb
dropbox_api-0.1.11 lib/dropbox_api/endpoints/files/get_preview.rb
dropbox_api-0.1.10 lib/dropbox_api/endpoints/files/get_preview.rb
dropbox_api-0.1.9 lib/dropbox_api/endpoints/files/get_preview.rb
dropbox_api-0.1.8 lib/dropbox_api/endpoints/files/get_preview.rb
dropbox_api-0.1.7 lib/dropbox_api/endpoints/files/get_preview.rb
dropbox_api-0.1.6 lib/dropbox_api/endpoints/files/get_preview.rb
dropbox_api-0.1.5 lib/dropbox_api/endpoints/files/get_preview.rb