Class: DropboxApi::Endpoints::Files::CreateFileRequest

Inherits:
Rpc
  • Object
show all
Defined in:
lib/dropbox_api/endpoints/file_requests/create_file_request.rb

Constant Summary collapse

Method =
:post
Path =
"/2/file_requests/create".freeze
ResultType =
DropboxApi::Metadata::FileRequest
ErrorType =
DropboxApi::Errors::CreateFileRequestError

Instance Method Summary collapse

Methods inherited from Rpc

#build_request, #initialize, #request_body

Methods inherited from Base

add_endpoint

Constructor Details

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

Instance Method Details

#create_file_request(title, destination) ⇒ Object

Create a file request for a given path.

Parameters:

  • title (String)

    The title of the file request. Must not be empty.

  • destination (String)

    The path of the folder in the Dropbox where uploaded files will be sent. For apps with the app folder permission, this will be relative to the app folder.



14
15
16
17
18
19
# File 'lib/dropbox_api/endpoints/file_requests/create_file_request.rb', line 14

add_endpoint :create_file_request do |title, destination|
  perform_request({
    :title => title,
    :destination => destination
  })
end