C# Class Box.V2.Managers.BoxGroupsManager

The class managing the Box API's Groups endpoint
Inheritance: BoxResourceManager
Mostra file Open project: box/box-windows-sdk-v2 Class Usage Examples

Public Methods

Method Description
AddMemberToGroupAsync ( Box.V2.Models.Request.BoxGroupMembershipRequest membershipRequest, List fields = null ) : Task

Add a user to a group.

BoxGroupsManager ( IBoxConfig config, IBoxService service, IBoxConverter converter, IAuthRepository auth, string asUser = null, bool suppressNotifications = null ) : Box.V2.Auth

Create a new Boxgroupmanager object.

CreateAsync ( Box.V2.Models.Request.BoxGroupRequest groupRequest, List fields = null ) : Task

Create a new group.

DeleteAsync ( string id ) : Task

Delete an existing group.

DeleteGroupMembershipAsync ( string id ) : Task

Delete a group membership.

GetAllGroupMembershipsForGroupAsync ( string groupId, int limit = null, int offset = null, List fields = null, bool autoPaginate = false ) : Task>

Get the list of group memberships for a given group.

GetAllGroupMembershipsForUserAsync ( string userId, int limit = null, int offset = null, List fields = null, bool autoPaginate = false ) : Task>

Get the list of group memberships for a given user.

GetAllGroupsAsync ( int limit = null, int offset = null, List fields = null, bool autoPaginate = false ) : Task>

Retrieves all of the groups for given enterprise. Must have permissions to see an enterprise's groups.

GetCollaborationsForGroupAsync ( string groupId, int limit = null, int offset = null, List fields = null, bool autoPaginate = false ) : Task>

Retrieves all of the group collaborations for a given group. Note this is only available to group admins.

GetGroupAsync ( string id, List fields = null ) : Task

Returns the group with the specified id.

GetGroupMembershipAsync ( string id, List fields = null ) : Task

Returns the group membership with the specified id.

UpdateAsync ( string id, Box.V2.Models.Request.BoxGroupRequest groupRequest, List fields = null ) : Task

Update an existing group.

UpdateGroupMembershipAsync ( string membershipId, Box.V2.Models.Request.BoxGroupMembershipRequest memRequest, List fields = null ) : Task

Updates the specified group membership with the specified request.

Method Details

AddMemberToGroupAsync() public method

Add a user to a group.
public AddMemberToGroupAsync ( Box.V2.Models.Request.BoxGroupMembershipRequest membershipRequest, List fields = null ) : Task
membershipRequest Box.V2.Models.Request.BoxGroupMembershipRequest BoxGroupMembershipRequest object.
fields List Attribute(s) to include in the response.
return Task

BoxGroupsManager() public method

Create a new Boxgroupmanager object.
public BoxGroupsManager ( IBoxConfig config, IBoxService service, IBoxConverter converter, IAuthRepository auth, string asUser = null, bool suppressNotifications = null ) : Box.V2.Auth
config IBoxConfig
service IBoxService
converter IBoxConverter
auth IAuthRepository
asUser string
suppressNotifications bool
return Box.V2.Auth

CreateAsync() public method

Create a new group.
public CreateAsync ( Box.V2.Models.Request.BoxGroupRequest groupRequest, List fields = null ) : Task
groupRequest Box.V2.Models.Request.BoxGroupRequest BoxGroupRequest object.
fields List Attribute(s) to include in the response.
return Task

DeleteAsync() public method

Delete an existing group.
public DeleteAsync ( string id ) : Task
id string The id of the group to delete.
return Task

DeleteGroupMembershipAsync() public method

Delete a group membership.
public DeleteGroupMembershipAsync ( string id ) : Task
id string The id of the groupmembership to delete.
return Task

GetAllGroupMembershipsForGroupAsync() public method

Get the list of group memberships for a given group.
public GetAllGroupMembershipsForGroupAsync ( string groupId, int limit = null, int offset = null, List fields = null, bool autoPaginate = false ) : Task>
groupId string The id of the group to get the list of memberships for.
limit int The number of results to return with this request. Refer to the Box API for defaults.
offset int The offset of the results. Refer to the Box API for more details.
fields List Attribute(s) to include in the response.
autoPaginate bool Whether or not to auto-paginate to fetch all group memberships; defaults to false.
return Task>

GetAllGroupMembershipsForUserAsync() public method

Get the list of group memberships for a given user.
public GetAllGroupMembershipsForUserAsync ( string userId, int limit = null, int offset = null, List fields = null, bool autoPaginate = false ) : Task>
userId string The id of the user to get the list of memberships for.
limit int The number of results to return with this request. Refer to the Box API for defaults.
offset int The offset of the results. Refer to the Box API for more details.
fields List Attribute(s) to include in the response.
autoPaginate bool Whether or not to auto-paginate to fetch all group memberships; defaults to false.
return Task>

GetAllGroupsAsync() public method

Retrieves all of the groups for given enterprise. Must have permissions to see an enterprise's groups.
public GetAllGroupsAsync ( int limit = null, int offset = null, List fields = null, bool autoPaginate = false ) : Task>
limit int The number of results to return with this request. Refer to the Box API for defaults.
offset int The offset of the results. Refer to the Box API for more details.
fields List Attribute(s) to include in the response.
autoPaginate bool Whether or not to auto-paginate to fetch all groups; defaults to false.
return Task>

GetCollaborationsForGroupAsync() public method

Retrieves all of the group collaborations for a given group. Note this is only available to group admins.
public GetCollaborationsForGroupAsync ( string groupId, int limit = null, int offset = null, List fields = null, bool autoPaginate = false ) : Task>
groupId string The id of the group to get the list of collaborations for.
limit int The number of results to return with this request. Refer to the Box API for defaults.
offset int The offset of the results. Refer to the Box API for more details.
fields List Attribute(s) to include in the response.
autoPaginate bool Whether or not to auto-paginate to fetch all group collaborations; defaults to false.
return Task>

GetGroupAsync() public method

Returns the group with the specified id.
public GetGroupAsync ( string id, List fields = null ) : Task
id string The id of the group to return.
fields List Attribute(s) to include in the response.
return Task

GetGroupMembershipAsync() public method

Returns the group membership with the specified id.
public GetGroupMembershipAsync ( string id, List fields = null ) : Task
id string The id of the group membership to return.
fields List Attribute(s) to include in the response.
return Task

UpdateAsync() public method

Update an existing group.
public UpdateAsync ( string id, Box.V2.Models.Request.BoxGroupRequest groupRequest, List fields = null ) : Task
id string Id of the group to update.
groupRequest Box.V2.Models.Request.BoxGroupRequest BoxGroupRequest object.
fields List Attribute(s) to include in the response.
return Task

UpdateGroupMembershipAsync() public method

Updates the specified group membership with the specified request.
public UpdateGroupMembershipAsync ( string membershipId, Box.V2.Models.Request.BoxGroupMembershipRequest memRequest, List fields = null ) : Task
membershipId string It of the group membership to update.
memRequest Box.V2.Models.Request.BoxGroupMembershipRequest BoxGroupMembershipRequest object.
fields List Attribute(s) to include in the response.
return Task