C# Class Box.V2.Managers.BoxCollectionsManager

Managing collections
Inheritance: BoxResourceManager
Datei anzeigen Open project: box/box-windows-sdk-v2 Class Usage Examples

Public Methods

Method Description
BoxCollectionsManager ( IBoxConfig config, IBoxService service, IBoxConverter converter, IAuthRepository auth, string asUser = null, bool suppressNotifications = null ) : Box.V2.Auth
CreateOrDeleteCollectionsForFileAsync ( string fileId, BoxCollectionsRequest collectionsRequest ) : Task

To add or remove an item from a collection, you do a PUT on that item and change the list of collections it belongs to.

CreateOrDeleteCollectionsForFolderAsync ( string folderId, BoxCollectionsRequest collectionsRequest ) : Task

To add or remove an item from a collection, you do a PUT on that item and change the list of collections it belongs to.

GetCollectionItemsAsync ( string collectionId, int limit = 100, int offset, List fields = null, bool autoPaginate = false ) : Task>

Retrieves the files and/or folders contained within this collection. Collection item lists behave a lot like getting a folder’s items.

GetCollectionsAsync ( ) : Task>

Retrieves the collections for the given user. Currently, only the favorites collection is supported.

Method Details

BoxCollectionsManager() public method

public BoxCollectionsManager ( 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

CreateOrDeleteCollectionsForFileAsync() public method

To add or remove an item from a collection, you do a PUT on that item and change the list of collections it belongs to.
public CreateOrDeleteCollectionsForFileAsync ( string fileId, BoxCollectionsRequest collectionsRequest ) : Task
fileId string Id of the file.
collectionsRequest Box.V2.Models.BoxCollectionsRequest The request which contains collections ids
return Task

CreateOrDeleteCollectionsForFolderAsync() public method

To add or remove an item from a collection, you do a PUT on that item and change the list of collections it belongs to.
public CreateOrDeleteCollectionsForFolderAsync ( string folderId, BoxCollectionsRequest collectionsRequest ) : Task
folderId string Id of the folder.
collectionsRequest Box.V2.Models.BoxCollectionsRequest The request which contains collections ids
return Task

GetCollectionItemsAsync() public method

Retrieves the files and/or folders contained within this collection. Collection item lists behave a lot like getting a folder’s items.
public GetCollectionItemsAsync ( string collectionId, int limit = 100, int offset, List fields = null, bool autoPaginate = false ) : Task>
collectionId string The collection identifier.
limit int The maximum number of items to return in a page.
offset int The offset at which to begin the response. An offset of value of 0 will start at the beginning of the folder-listing. Offset of 2 would start at the 2nd record, not the second page. Note: If there are hidden items in your previous response, your next offset should be = offset + limit, not the # of records you received back.
fields List Attribute(s) to include in the response.
autoPaginate bool Whether or not to auto-paginate to fetch all items; defaults to false.
return Task>

GetCollectionsAsync() public method

Retrieves the collections for the given user. Currently, only the favorites collection is supported.
public GetCollectionsAsync ( ) : Task>
return Task>