Class: DropboxApi::Endpoints::Sharing::ListFolderMembers

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

Constant Summary collapse

Method =
:post
Path =
"/2/sharing/list_folder_members".freeze
ResultType =
DropboxApi::Results::SharedFolderMembers
ErrorType =
DropboxApi::Errors::SharedFolderAccessError

Instance Method Summary collapse

Methods included from OptionsValidator

#validate_options

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

#list_folder_members(folder_id, actions = [], options = {}) ⇒ SharedFolderMembers

Returns shared folder membership by its folder ID.

Apps must have full Dropbox access to use this endpoint.

Examples:

List folder members.

client.list_folder_members "1231273663"

List folder members, with detail of permission to make owner.

client.list_folder_members "1231273663", [:make_owner]

Parameters:

  • folder_id (String)

    The ID for the shared folder.

  • actions (Array) (defaults to: [])

    This is an optional list of actions. The permissions for the actions requested will be included in the result.

Options Hash (options):

  • limit (Numeric)

    The maximum number of results that include members, groups and invitees to return per request. The default for this field is 1000.

Returns:

  • (SharedFolderMembers)

    Shared folder user and group membership.

See Also:


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

add_endpoint :list_folder_members do |folder_id, actions = [], options = {}|
  validate_options([:limit], options)
  options[:limit] ||= 100

  perform_request options.merge({
    :shared_folder_id => folder_id,
    :actions => DropboxApi::Metadata::MemberActionList.new(actions)
  })
end