Class: DropboxApi::Endpoints::Files::Download

Inherits:
ContentDownload show all
Defined in:
lib/dropbox_api/endpoints/files/download.rb

Constant Summary collapse

Method =
:post
Path =
'/2/files/download'
ResultType =
DropboxApi::Metadata::File
ErrorType =
DropboxApi::Errors::DownloadError

Instance Method Summary collapse

Methods inherited from ContentDownload

#build_connection, #build_request, #perform_request

Methods inherited from Base

add_endpoint, #initialize

Constructor Details

This class inherits a constructor from DropboxApi::Endpoints::Base

Instance Method Details

#download(path, &block) ⇒ Object

Download a file from a user's Dropbox.

Parameters:

  • path (String)

    The path of the file to download.



12
13
14
# File 'lib/dropbox_api/endpoints/files/download.rb', line 12

add_endpoint :download do |path, &block|
  perform_request({path: path}, &block)
end