Sha256: 404ab01b6d59bd8724a562effa54ffbb4dfb9f2bcd335bdaebfe0760fcac26a0

Contents?: true

Size: 1.53 KB

Versions: 6

Compression:

Stored size: 1.53 KB

Contents

module DropboxApi::Endpoints::Sharing
  class ListFolderMembers < DropboxApi::Endpoints::Rpc
    Method      = :post
    Path        = "/2/sharing/list_folder_members".freeze
    ResultType  = DropboxApi::Results::SharedFolderMembers
    ErrorType   = DropboxApi::Errors::SharedFolderAccessError

    include DropboxApi::Endpoints::OptionsValidator

    # Returns shared folder membership by its folder ID.
    #
    # Apps must have full Dropbox access to use this endpoint.
    #
    # @example List folder members.
    #   client.list_folder_members "1231273663"
    #
    # @example List folder members, with detail of permission to make owner.
    #   client.list_folder_members "1231273663", [:make_owner]
    #
    # @param folder_id [String] The ID for the shared folder.
    # @param actions [Array]
    #   This is an optional list of actions. The permissions for the actions
    #   requested will be included in the result.
    # @option 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.
    # @return [SharedFolderMembers] Shared folder user and group membership.
    # @see Metadata::MemberActionList
    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
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
dropbox_api-0.1.10 lib/dropbox_api/endpoints/sharing/list_folder_members.rb
dropbox_api-0.1.9 lib/dropbox_api/endpoints/sharing/list_folder_members.rb
dropbox_api-0.1.8 lib/dropbox_api/endpoints/sharing/list_folder_members.rb
dropbox_api-0.1.7 lib/dropbox_api/endpoints/sharing/list_folder_members.rb
dropbox_api-0.1.6 lib/dropbox_api/endpoints/sharing/list_folder_members.rb
dropbox_api-0.1.5 lib/dropbox_api/endpoints/sharing/list_folder_members.rb