Class: DropboxApi::Endpoints::Files::CreateFolder

Inherits:
Rpc
  • Object
show all
Defined in:
lib/dropbox_api/endpoints/files/create_folder.rb

Constant Summary collapse

Method =
:post
Path =
"/2/files/create_folder".freeze
ResultType =
DropboxApi::Metadata::Folder
ErrorType =
DropboxApi::Errors::CreateFolderError

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_folder(path) ⇒ DropboxApi::Metadata::Folder

Create a folder at a given path.

Parameters:

  • path (String)

    Path in the user's Dropbox to create.

Returns:



12
13
14
15
16
# File 'lib/dropbox_api/endpoints/files/create_folder.rb', line 12

add_endpoint :create_folder do |path|
  perform_request({
    :path => path
  })
end