Class: DropboxApi::Endpoints::Sharing::AddFileMember
- Includes:
- OptionsValidator
- Defined in:
- lib/dropbox_api/endpoints/sharing/add_file_member.rb
Constant Summary collapse
- Method =
:post
- Path =
'/2/sharing/add_file_member'
- ResultType =
DropboxApi::Results::AddFileMemberResultList
- ErrorType =
DropboxApi::Errors::AddFileMemberError
Instance Method Summary collapse
-
#add_file_member(file, members, options = {}) ⇒ Object
Adds specified members to a file.
Methods included from OptionsValidator
Methods inherited from Rpc
#build_connection, #build_request, #request_body
Methods inherited from Base
Constructor Details
This class inherits a constructor from DropboxApi::Endpoints::Base
Instance Method Details
#add_file_member(file, members, options = {}) ⇒ Object
Adds specified members to a file.
The members
parameter can be an Array
or a single member element. Each
element is represented by either a String
or a Metadata::Member
object. You can identify a member using his email or a Dropbox ID.
34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/dropbox_api/endpoints/sharing/add_file_member.rb', line 34 add_endpoint :add_file_member do |file, members, = {}| ([:quiet, :custom_message, :access_level, :add_message_as_comment], ) [:quiet] ||= false [:custom_message] ||= nil [:access_level] ||= :viewer [:add_message_as_comment] ||= false perform_request .merge({ file: file, members: build_members_param(members) }) end |