Class: DropboxApi::Endpoints::Sharing::AddFolderMember

Inherits:
Rpc
  • Object
show all
Includes:
OptionsValidator
Defined in:
lib/dropbox_api/endpoints/sharing/add_folder_member.rb

Constant Summary collapse

Method =
:post
Path =
"/2/sharing/add_folder_member".freeze
ResultType =
DropboxApi::Results::VoidResult
ErrorType =
DropboxApi::Errors::AddFolderMemberError

Instance Method Summary collapse

Methods included from OptionsValidator

#validate_options

Methods inherited from Rpc

#build_request, #initialize

Methods inherited from Base

add_endpoint

Constructor Details

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

Instance Method Details

#add_folder_member(folder_id, members, options) ⇒ Object

Allows an owner or editor (if the ACL update policy allows) of a shared folder to add another member.

For the new member to get access to all the functionality for this folder, you will need to call mount_folder on their behalf.

Apps must have full Dropbox access to use this endpoint.

Parameters:

  • folder_id (String)

    The ID for the shared folder.

  • members (Array<AddMember,String>)

    The intended list of members to add. Added members will receive invites to join the shared folder.



27
28
29
30
31
32
33
34
35
36
37
# File 'lib/dropbox_api/endpoints/sharing/add_folder_member.rb', line 27

add_endpoint :add_folder_member do |folder_id, members, options = {}|
  # TODO: It should be possible to take an email (String) as the argument.
  validate_options([:quiet, :custom_message], options)
  options[:quiet] ||= false
  options[:custom_message] ||= nil

  perform_request options.merge({
    :shared_folder_id => folder_id,
    :members => build_members_param(members)
  })
end