Метод | Описание | |
---|---|---|
ApplyWatermarkAsync ( string id, |
Used to apply or update the watermark for a corresponding Box file.
|
|
BoxFilesManager ( IBoxConfig config, IBoxService service, IBoxConverter converter, IAuthRepository auth, string asUser = null, bool suppressNotifications = null ) : Box.V2.Auth | ||
CopyAsync ( Box.V2.Models.BoxFileRequest fileRequest, List |
Used to create a copy of a file in another folder. The original version of the file will not be altered.
|
|
CreateSharedLinkAsync ( string id, Box.V2.Models.BoxSharedLinkRequest sharedLinkRequest, List |
Used to create a shared link for this particular file. Please see here for more information on the permissions available for shared links.
|
|
DeleteAsync ( string id, string etag = null ) : Task |
Discards a file to the trash. The etag of the file can be included as an ‘If-Match’ header to prevent race conditions.
|
|
DeleteOldVersionAsync ( string id, string versionId, string etag = null ) : Task |
Discards a specific file version to the trash.
|
|
DeleteSharedLinkAsync ( string id ) : Task |
Used to delete the shared link for this particular file.
|
|
DownloadStreamAsync ( string id, string versionId = null, System.TimeSpan timeout = null ) : Task |
Returns the stream of the requested file.
|
|
GetCommentsAsync ( string id, List |
Retrieves the comments on a particular file, if any exist.
|
|
GetDownloadUriAsync ( string id, string versionId = null ) : Task |
Retrieves the temporary direct Uri to a file (valid for 15 minutes). This is typically used to send as a redirect to a browser to make the browser download the file directly from Box.
|
|
GetFileTasks ( string id, List |
Retrieves all of the tasks for given file.
|
|
GetInformationAsync ( string id, List |
Retrieves information about a file.
|
|
GetLockAsync ( string id ) : Task |
Gets a lock file object representation of the lock on the provided file Id (if a lock exists, otherwise returns null).
|
|
GetPreviewLinkAsync ( string id ) : Task |
Gets a preview link (URI) for a file that is valid for 60 seconds.
|
|
GetThumbnailAsync ( string id, int minHeight = null, int minWidth = null, int maxHeight = null, int maxWidth = null, bool throttle = true, bool handleRetry = true ) : Task |
Retrieves a thumbnail, or smaller image representation, of this file. Sizes of 32x32, 64x64, 128x128, and 256x256 can be returned in the .png format and sizes of 32x32, 94x94, 160x160, and 320x320 can be returned in the .jpg format. Thumbnails can be generated for the image and video file formats listed here. http://community.box.com/t5/Managing-Your-Content/What-file-types-are-supported-by-Box-s-Content-Preview/ta-p/327
|
|
GetTrashedAsync ( string id, List |
Retrieves an item that has been moved to the trash.
|
|
GetWatermarkAsync ( string id ) : Task |
Used to retrieve the watermark for a corresponding Box file.
|
|
LockAsync ( |
Used to create a lock on the file.
|
|
PreflightCheck ( Box.V2.Models.BoxPreflightCheckRequest preflightCheckRequest ) : Task |
Verify that a file will be accepted by Box before you send all the bytes over the wire. Preflight checks verify all permissions as if the file was actually uploaded including: Folder upload permission File name collisions file size caps folder and file name restrictions* folder and account storage quota |
|
PreflightCheckNewVersion ( string fileId, Box.V2.Models.BoxPreflightCheckRequest preflightCheckRequest ) : Task |
Verify that a new version of a file will be accepted by Box before you send all the bytes over the wire.
|
|
PromoteVersionAsync ( string id, string versionId ) : Task |
If there are previous versions of this file, this method can be used to promote one of the older versions to the top of the stack. This actually mints a copy of the old version and puts it on the top of the versions stack. The file will have the exact same contents, the same SHA1/etag, and the same name as the promoted version. Other properties such as comments do not get updated to their former values.
|
|
PurgeTrashedAsync ( string id ) : Task |
Permanently deletes an item that is in the trash. The item will no longer exist in Box. This action cannot be undone.
|
|
RemoveWatermarkAsync ( string id ) : Task |
Used to remove the watermark for a corresponding Box file.
|
|
RestoreTrashedAsync ( Box.V2.Models.BoxFileRequest fileRequest, List |
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.
|
|
UnLock ( string id ) : Task |
Remove a lock
|
|
UpdateInformationAsync ( Box.V2.Models.BoxFileRequest fileRequest, string etag = null, List |
Used to update individual or multiple fields in the file object, including renaming the file, changing it’s description, and creating a shared link for the file. To move a file, change the ID of its parent folder. An optional etag can be included to ensure that client only updates the file if it knows about the latest version.
|
|
UpdateLockAsync ( |
Used to update the lock information on the file (for example, ExpiresAt or IsDownloadPrevented.
|
|
UploadAsync ( Box.V2.Models.BoxFileRequest fileRequest, Stream stream, List |
Uploads a provided file to the target parent folder. If the file already exists, an error will be thrown. A proper timeout should be provided for large uploads.
|
|
UploadNewVersionAsync ( string fileName, string fileId, Stream stream, string etag = null, List |
This method is used to upload a new version of an existing file in a user’s account. Similar to regular file uploads, these are performed as multipart form uploads. An optional If-Match header can be included to ensure that client only overwrites the file if it knows about the latest version. The filename on Box will remain the same as the previous version. To update the file’s name, you can specify a new name for the file using the fileName parameter. A proper timeout should be provided for large uploads.
|
|
ViewVersionsAsync ( string id, List |
If there are previous versions of this file, this method can be used to retrieve metadata about the older versions.
|
Метод | Описание | |
---|---|---|
GetFilePreviewAsync ( string id, int page, int maxWidth = null, int minWidth = null, int maxHeight = null, int minHeight = null, bool handleRetry = true ) : Task |
||
GetPreviewAsync ( string id, int page, bool handleRetry = true ) : Task |
||
GetPreviewResponseAsync ( string id, int page, int maxWidth = null, int minWidth = null, int maxHeight = null, int minHeight = null, bool handleRetry = true ) : Task |
||
GetTimeDelay ( HttpResponseHeaders headers ) : int |
Return the time to wait until retrying the call. If no RetryAfter value is specified in the header, use default value;
|
|
HexStringFromBytes ( byte bytes ) : string |
public ApplyWatermarkAsync ( string id, |
||
id | string | Id of the file. |
applyWatermarkRequest | BoxApplyWatermarkRequest object. Can be null, for using default values - imprint="default" | |
Результат | Task |
public BoxFilesManager ( 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 | |
Результат | Box.V2.Auth |
public CopyAsync ( Box.V2.Models.BoxFileRequest fileRequest, List |
||
fileRequest | Box.V2.Models.BoxFileRequest | BoxFileRequest object. |
fields | List |
Attribute(s) to include in the response. |
Результат | Task |
public CreateSharedLinkAsync ( string id, Box.V2.Models.BoxSharedLinkRequest sharedLinkRequest, List |
||
id | string | Id of the file. |
sharedLinkRequest | Box.V2.Models.BoxSharedLinkRequest | BoxSharedLinkRequest object. |
fields | List |
Attribute(s) to include in the response. |
Результат | Task |
public DeleteAsync ( string id, string etag = null ) : Task |
||
id | string | Id of the file. |
etag | string | This ‘etag’ field of the file, which will be set in the If-Match header. |
Результат | Task |
public DeleteOldVersionAsync ( string id, string versionId, string etag = null ) : Task |
||
id | string | Id of the file (Required). |
versionId | string | Id of the version (Required). |
etag | string | The etag of the file. This is in the ‘etag’ field of the file object. |
Результат | Task |
public DeleteSharedLinkAsync ( string id ) : Task |
||
id | string | |
Результат | Task |
public DownloadStreamAsync ( string id, string versionId = null, System.TimeSpan timeout = null ) : Task |
||
id | string | Id of the file to download. |
versionId | string | The ID specific version of this file to download. |
timeout | System.TimeSpan | Optional timeout for response. |
Результат | Task |
public GetCommentsAsync ( string id, List |
||
id | string | The Id of the item that the comments should be retrieved for. |
fields | List |
Attribute(s) to include in the response. |
Результат | Task |
public GetDownloadUriAsync ( string id, string versionId = null ) : Task |
||
id | string | Id of the file. |
versionId | string | Version of the file. |
Результат | Task |
public GetFileTasks ( string id, List |
||
id | string | Id of the file. |
fields | List |
Attribute(s) to include in the response. |
Результат | Task |
public GetInformationAsync ( string id, List |
||
id | string | Id of the file. |
fields | List |
Attribute(s) to include in the response. |
Результат | Task |
public GetLockAsync ( string id ) : Task |
||
id | string | Id of the file. |
Результат | Task |
public GetPreviewLinkAsync ( string id ) : Task |
||
id | string | Id of the file. |
Результат | Task |
public GetThumbnailAsync ( string id, int minHeight = null, int minWidth = null, int maxHeight = null, int maxWidth = null, bool throttle = true, bool handleRetry = true ) : Task |
||
id | string | Id of the file. |
minHeight | int | The minimum height of the thumbnail. |
minWidth | int | The minimum width of the thumbnail. |
maxHeight | int | The maximum height of the thumbnail. |
maxWidth | int | The maximum width of the thumbnail. |
throttle | bool | Whether the requests will be throttled. Recommended to be left true to prevent spamming the server. |
handleRetry | bool | Specifies whether the method handles retries. If true, then the method would retry the call if the HTTP response is 'Accepted'. The delay for the retry is determined /// by the RetryAfter header, or if that header is not set, by the constant DefaultRetryDelay. |
Результат | Task |
public GetTrashedAsync ( string id, List |
||
id | string | Id of the file. |
fields | List |
Attribute(s) to include in the response. |
Результат | Task |
public GetWatermarkAsync ( string id ) : Task |
||
id | string | Id of the file. |
Результат | Task |
public LockAsync ( |
||
lockFileRequest | Request contains Lock object for setting of lock properties such as ExpiresAt - the time the lock expires, IsDownloadPrevented - whether or not the file can be downloaded while locked. | |
id | string | Id of the file. |
Результат | Task |
public PreflightCheck ( Box.V2.Models.BoxPreflightCheckRequest preflightCheckRequest ) : Task |
||
preflightCheckRequest | Box.V2.Models.BoxPreflightCheckRequest | BoxPreflightCheckRequest object. |
Результат | Task |
public PreflightCheckNewVersion ( string fileId, Box.V2.Models.BoxPreflightCheckRequest preflightCheckRequest ) : Task |
||
fileId | string | |
preflightCheckRequest | Box.V2.Models.BoxPreflightCheckRequest | |
Результат | Task |
public PromoteVersionAsync ( string id, string versionId ) : Task |
||
id | string | Id of the file (Required). |
versionId | string | Id of the version (Required). |
Результат | Task |
public PurgeTrashedAsync ( string id ) : Task |
||
id | string | Id of the file. |
Результат | Task |
public RemoveWatermarkAsync ( string id ) : Task |
||
id | string | Id of the file. |
Результат | Task |
public RestoreTrashedAsync ( Box.V2.Models.BoxFileRequest fileRequest, List |
||
fileRequest | Box.V2.Models.BoxFileRequest | BoxFileRequest object. |
fields | List |
Attribute(s) to include in the response. |
Результат | Task |
public UpdateInformationAsync ( Box.V2.Models.BoxFileRequest fileRequest, string etag = null, List |
||
fileRequest | Box.V2.Models.BoxFileRequest | BoxFileRequest object. |
etag | string | This ‘etag’ field of the file, which will be set in the If-Match header. |
fields | List |
Attribute(s) to include in the response. |
Результат | Task |
public UpdateLockAsync ( |
||
lockFileRequest | BoxFileLockRequest object. | |
id | string | Id of the file. |
Результат | Task |
public UploadAsync ( Box.V2.Models.BoxFileRequest fileRequest, Stream stream, List |
||
fileRequest | Box.V2.Models.BoxFileRequest | BoxFileRequest object. |
stream | Stream | Stream of uploading file. |
fields | List |
Fields which shall be returned in result. |
timeout | System.TimeSpan | Timeout for response. |
contentMD5 | byte | The SHA1 hash of the file. |
setStreamPositionToZero | bool | Set position for input stream to 0. |
uploadUri | Uri to use for upload. Default upload endpoint URI is used if not specified. | |
Результат | Task |
public UploadNewVersionAsync ( string fileName, string fileId, Stream stream, string etag = null, List |
||
fileName | string | Name of the file. |
fileId | string | Id of the file to upload a new version to. |
stream | Stream | Stream of the uploading file. |
etag | string | This ‘etag’ field of the file, which will be set in the If-Match header. |
fields | List |
Fields which shall be returned in result. |
timeout | System.TimeSpan | Optional timeout for response. |
contentMD5 | byte | The SHA1 hash of the file. |
setStreamPositionToZero | bool | Set position for input stream to 0. |
uploadUri | Optional url for uploading file. | |
Результат | Task |
public ViewVersionsAsync ( string id, List |
||
id | string | The file id. |
fields | List |
Attribute(s) to include in the response. |
Результат | Task |