C# Class Box.V2.Managers.BoxFoldersManager

Inheritance: BoxResourceManager
ファイルを表示 Open project: box/box-windows-sdk-v2 Class Usage Examples

Public Methods

Method Description
ApplyWatermarkAsync ( string id, BoxApplyWatermarkRequest applyWatermarkRequest = null ) : Task

Used to apply or update the watermark for a corresponding Box folder.

BoxFoldersManager ( IBoxConfig config, IBoxService service, IBoxConverter converter, IAuthRepository auth, string asUser = null, bool suppressNotifications = null ) : Box.V2.Auth
CopyAsync ( Box.V2.Models.BoxFolderRequest folderRequest, List fields = null ) : Task

Used to create a copy of a folder in another folder. The original version of the folder will not be altered.

CreateAsync ( Box.V2.Models.BoxFolderRequest folderRequest, List fields = null ) : Task

Used to create a new empty folder. The new folder will be created inside of the specified parent folder.

CreateSharedLinkAsync ( string id, Box.V2.Models.BoxSharedLinkRequest sharedLinkRequest, List fields = null ) : Task

Used to create a shared link for this particular folder. In order to get default shared link status, set it to an empty access level. To delete a shared link use the DeleteSharedLinkAsync method of this class.

DeleteAsync ( string id, bool recursive = false, string etag = null ) : Task

Used to delete a folder. A recursive parameter must be included in order to delete folders that have items inside of them. An optional If-Match header can be included using the etag parameter to ensure that client only deletes the folder if it knows about the latest version.

DeleteSharedLinkAsync ( string id ) : Task

Used to delete the shared link for the given folder id.

GetCollaborationsAsync ( string id, List fields = null ) : Task>

Use this to get a list of all the collaborations on a folder i.e. all of the users that have access to that folder.

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

Retrieves the files and/or folders contained within this folder without any other metadata about the folder. Any attribute in the full files or folders objects can be passed in with the fields parameter to get specific attributes, and only those specific attributes back; otherwise, the mini format is returned for each item by default. Multiple attributes can be passed in using the fields parameter. Paginated results can be retrieved using the limit and offset parameters.

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

Retrieves the full metadata about a folder, including information about when it was last updated as well as the files and folders contained in it. To retrieve information about the root folder of a Box account use the id “0″.

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

Retrieves the files and/or folders that have been moved to the trash. Any attribute in the full files or folders objects can be passed in with the fields parameter to get specific attributes, and only those specific attributes back; otherwise, the mini format is returned for each item by default. Multiple attributes can be passed in using the fields parameter. Paginated results can be retrieved using the limit and offset parameters.

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

Retrieves a folder that has been moved to the trash.

GetWatermarkAsync ( string id ) : Task

Used to retrieve the watermark for a corresponding Box folder.

PurgeTrashedFolderAsync ( string id ) : Task

Permanently deletes a folder that is in the trash. The folder will no longer exist in Box. This action cannot be undone.

RemoveWatermarkAsync ( string id ) : Task

Used to remove the watermark for a corresponding Box folder.

RestoreTrashedFolderAsync ( Box.V2.Models.BoxFolderRequest folderRequest, List fields = null ) : Task

Restores an item that has been moved to the trash. Default behavior is to restore the item to the folder it was in before it was moved to the trash. If that parent folder no longer exists or if there is now an item with the same name in that parent folder, the new parent folder and/or new name will need to be included in the request.

UpdateInformationAsync ( Box.V2.Models.BoxFolderRequest folderRequest, List fields = null, string etag = null ) : Task

Used to update information about the folder. To move a folder, update the ID of its parent. To enable an email address that can be used to upload files to this folder, update the folder_upload_email attribute. An optional If-Match header can be included using the etag parameter to ensure that client only updates the folder if it knows about the latest version.

Private Methods

Method Description
GetItemsAsync ( string id, int limit, int offset, List fields = null ) : Task
GetTrashItemsAsync ( string id, int limit, int offset, List fields = null ) : Task>

Method Details

ApplyWatermarkAsync() public method

Used to apply or update the watermark for a corresponding Box folder.
public ApplyWatermarkAsync ( string id, BoxApplyWatermarkRequest applyWatermarkRequest = null ) : Task
id string Id of the folder.
applyWatermarkRequest Box.V2.Models.BoxApplyWatermarkRequest BoxApplyWatermarkRequest object. Can be null, for using default values - imprint="default"
return Task

BoxFoldersManager() public method

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

CopyAsync() public method

Used to create a copy of a folder in another folder. The original version of the folder will not be altered.
public CopyAsync ( Box.V2.Models.BoxFolderRequest folderRequest, List fields = null ) : Task
folderRequest Box.V2.Models.BoxFolderRequest BoxFolderRequest object
fields List Attribute(s) to include in the response
return Task

CreateAsync() public method

Used to create a new empty folder. The new folder will be created inside of the specified parent folder.
public CreateAsync ( Box.V2.Models.BoxFolderRequest folderRequest, List fields = null ) : Task
folderRequest Box.V2.Models.BoxFolderRequest BoxFolderRequest object
fields List Attribute(s) to include in the response
return Task

CreateSharedLinkAsync() public method

Used to create a shared link for this particular folder. In order to get default shared link status, set it to an empty access level. To delete a shared link use the DeleteSharedLinkAsync method of this class.
public CreateSharedLinkAsync ( string id, Box.V2.Models.BoxSharedLinkRequest sharedLinkRequest, List fields = null ) : Task
id string Id of the folder to create shared link for
sharedLinkRequest Box.V2.Models.BoxSharedLinkRequest Shared link request object
fields List Attribute(s) to include in the response
return Task

DeleteAsync() public method

Used to delete a folder. A recursive parameter must be included in order to delete folders that have items inside of them. An optional If-Match header can be included using the etag parameter to ensure that client only deletes the folder if it knows about the latest version.
public DeleteAsync ( string id, bool recursive = false, string etag = null ) : Task
id string Id of the folder
recursive bool Whether to delete this folder if it has items inside of it.
etag string This ‘etag’ field of the folder object to set in the If-Match header
return Task

DeleteSharedLinkAsync() public method

Used to delete the shared link for the given folder id.
public DeleteSharedLinkAsync ( string id ) : Task
id string
return Task

GetCollaborationsAsync() public method

Use this to get a list of all the collaborations on a folder i.e. all of the users that have access to that folder.
public GetCollaborationsAsync ( string id, List fields = null ) : Task>
id string Id of the folder
fields List Attribute(s) to include in the response
return Task>

GetFolderItemsAsync() public method

Retrieves the files and/or folders contained within this folder without any other metadata about the folder. Any attribute in the full files or folders objects can be passed in with the fields parameter to get specific attributes, and only those specific attributes back; otherwise, the mini format is returned for each item by default. Multiple attributes can be passed in using the fields parameter. Paginated results can be retrieved using the limit and offset parameters.
public GetFolderItemsAsync ( string id, int limit, int offset, List fields = null, bool autoPaginate = false ) : Task>
id string
limit int The maximum number of items to return in a page. The default is 100 and the max is 1000.
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. /// Note: If there are hidden items in your previous response, your next offset should be = offset + limit, not the # of records you received back. /// The default is 0.
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>

GetInformationAsync() public method

Retrieves the full metadata about a folder, including information about when it was last updated as well as the files and folders contained in it. To retrieve information about the root folder of a Box account use the id “0″.
public GetInformationAsync ( string id, List fields = null ) : Task
id string The folder id
fields List Attribute(s) to include in the response
return Task

GetTrashItemsAsync() public method

Retrieves the files and/or folders that have been moved to the trash. Any attribute in the full files or folders objects can be passed in with the fields parameter to get specific attributes, and only those specific attributes back; otherwise, the mini format is returned for each item by default. Multiple attributes can be passed in using the fields parameter. Paginated results can be retrieved using the limit and offset parameters.
public GetTrashItemsAsync ( int limit, int offset, List fields = null, bool autoPaginate = false ) : Task>
limit int The maximum number of items to return
offset int The item at which to begin the response
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>

GetTrashedFolderAsync() public method

Retrieves a folder that has been moved to the trash.
public GetTrashedFolderAsync ( string id, List fields = null ) : Task
id string Id of the folder
fields List Attribute(s) to include in the response
return Task

GetWatermarkAsync() public method

Used to retrieve the watermark for a corresponding Box folder.
public GetWatermarkAsync ( string id ) : Task
id string Id of the folder.
return Task

PurgeTrashedFolderAsync() public method

Permanently deletes a folder that is in the trash. The folder will no longer exist in Box. This action cannot be undone.
public PurgeTrashedFolderAsync ( string id ) : Task
id string Id of the folder
return Task

RemoveWatermarkAsync() public method

Used to remove the watermark for a corresponding Box folder.
public RemoveWatermarkAsync ( string id ) : Task
id string Id of the folder.
return Task

RestoreTrashedFolderAsync() public method

Restores an item that has been moved to the trash. Default behavior is to restore the item to the folder it was in before it was moved to the trash. If that parent folder no longer exists or if there is now an item with the same name in that parent folder, the new parent folder and/or new name will need to be included in the request.
public RestoreTrashedFolderAsync ( Box.V2.Models.BoxFolderRequest folderRequest, List fields = null ) : Task
folderRequest Box.V2.Models.BoxFolderRequest BoxFolderRequest object (specify Parent.Id if you wish to restore to a different parent)
fields List Attribute(s) to include in the response
return Task

UpdateInformationAsync() public method

Used to update information about the folder. To move a folder, update the ID of its parent. To enable an email address that can be used to upload files to this folder, update the folder_upload_email attribute. An optional If-Match header can be included using the etag parameter to ensure that client only updates the folder if it knows about the latest version.
public UpdateInformationAsync ( Box.V2.Models.BoxFolderRequest folderRequest, List fields = null, string etag = null ) : Task
folderRequest Box.V2.Models.BoxFolderRequest BoxFolderRequest object
fields List Attribute(s) to include in the response
etag string This ‘etag’ field of the folder object to set in the If-Match header
return Task