diff --git a/Box.V2.Core/Box.V2.Core.csproj b/Box.V2.Core/Box.V2.Core.csproj index 84ded3e93..c0999157d 100644 --- a/Box.V2.Core/Box.V2.Core.csproj +++ b/Box.V2.Core/Box.V2.Core.csproj @@ -3,14 +3,14 @@ Box.V2 for .Net Core Box.V2.Core - 3.11.0 + 3.12.0 Box, Inc. Box, Inc. https://github.com/box/box-windows-sdk-v2 false Windows SDK for v2 of the Box API. The SDK is built for .NET Core and includes JWTAuth support. - Fixed renaming file on version upload, setting and reading Group properties, and clearing shared link expiration. - Copyright 2018 + See https://github.com/box/box-windows-sdk-v2/blob/master/CHANGELOG.md#3120 + Copyright 2019 Box;V2;SDK;Platform;Enterprise;Collaboration;Storage;File Management netstandard1.6 Box.V2.Core diff --git a/Box.V2/Box.V2.nuspec b/Box.V2/Box.V2.nuspec index 8937c1469..c654bc344 100644 --- a/Box.V2/Box.V2.nuspec +++ b/Box.V2/Box.V2.nuspec @@ -2,15 +2,15 @@ Box.V2 - 3.11.0 + 3.12.0 Box Windows SDK V2 Box, Inc. Box, Inc. https://github.com/box/box-windows-sdk-v2 false Windows SDK for v2 of the Box API. The SDK is targeting .NET Framework 4.5 - Fixed renaming file on version upload, setting and reading Group properties, and clearing shared link expiration. - Copyright 2018 + See https://github.com/box/box-windows-sdk-v2/blob/master/CHANGELOG.md#3120 + Copyright 2019 Box V2 SDK Platform Enterprise Collaboration Storage File Management \ No newline at end of file diff --git a/Box.V2/Utility/AssemblyInfo.cs b/Box.V2/Utility/AssemblyInfo.cs index f0205c59f..a016393f6 100644 --- a/Box.V2/Utility/AssemblyInfo.cs +++ b/Box.V2/Utility/AssemblyInfo.cs @@ -5,7 +5,7 @@ internal class AssemblyInfo public const string AssemblyTitle = "Box.V2"; public const string AssemblyProduct = "Box.V2"; - public const string NuGetVersion = "3.11.0"; + public const string NuGetVersion = "3.12.0"; public const string AssemblyVersion = "1.0.0.0"; public const string AssemblyFileVersion = "1.0.0.0"; } diff --git a/CHANGELOG.md b/CHANGELOG.md index f513ab9af..dd0319d37 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,14 @@ # Changelog +## 3.12.0 + +- Added `client.FilesManager.GetCollaborationsCollectionAsync()` and deprecated + `client.FilesManager.GetCollaborationsAsync()` to enable paging through the entire + collection of collaborations on a file +- Added `client.WebLinksManager.CopyAsync()`, `client.WebLinksManager.CreateSharedLinkAsync()`, + and `client.WebLinksManager.DeleteSharedLinkAsync()` +- Added `client.UsersManager.GetUserAvatarAsync()` for retrieving a user's avatar image + ## 3.11.0 - Added support for reading and writing more Group fields diff --git a/docs/collaborations.md b/docs/collaborations.md index 63f26116e..08390a834 100644 --- a/docs/collaborations.md +++ b/docs/collaborations.md @@ -100,13 +100,13 @@ Get the Collaborations on a File -------------------------------- You can get the collection of collaborations on a file by calling -`FilesManager.GetCollaborationsAsync(string id, IEnumerable fields = null)` +`FilesManager.GetCollaborationsCollectionAsync(string id, string marker = null, int? limit = null, IEnumerable fields = null, bool autoPaginate = false)` with the ID of the file. ```c# string fileId = "98765"; -BoxCollection collaborations = await client.FilesManager - .GetCollaborationsAsync(fileId); +BoxCollectionMarkerBasedV2 collaborations = await client.FilesManager + .GetCollaborationsCollectionAsync(fileId); ``` Get Pending Collaborations diff --git a/docs/users.md b/docs/users.md index 9487d866e..bf5bfdf33 100644 --- a/docs/users.md +++ b/docs/users.md @@ -9,6 +9,7 @@ Users represent an individual's account on Box. - [Get the Current User's Information](#get-the-current-users-information) - [Get User's Information](#get-users-information) +- [Get User Avatar](#get-user-avatar) - [Add New User](#add-new-user) - [Add New App User](#add-new-app-user) - [Update User](#update-user) @@ -40,6 +41,16 @@ To get a user call `UsersManager.GetUserInformationAsync(string userId)` with th BoxUser user = await client.UsersManager.GetUserInformationAsync(userId: "33333"); ``` +Get User Avatar +--------------- + +To retrieve the avatar image for a user, call +`UsersManager.GetUserAvatar(string userId)` with the ID of the user. + +```c# +Stream imageStream = await client.UsersManager.GetUserAvatar(string userId); +``` + Add New User ------------ diff --git a/docs/web-links.md b/docs/web-links.md index b018be036..e005cb47d 100644 --- a/docs/web-links.md +++ b/docs/web-links.md @@ -13,6 +13,9 @@ and restore. - [Get a Web Link's information](#get-a-web-links-information) - [Update a Web Link](#update-a-web-link) - [Delete a Web Link](#delete-a-web-link) +- [Copy a Web Link](#copy-a-web-link) +- [Create a Shared Link](#create-a-shared-link) +- [Remove a Shared Link](#remove-a-shared-link) @@ -66,4 +69,41 @@ with the ID of the web link object to delete. ```c# await client.WebLinksManager.DeleteWebLinkAsync("11111"); -``` \ No newline at end of file +``` + +Copy a Web Link +--------------- + +To make a copy of a web link, call `WebLinksManager.CopyAsync(string webLinkId, string destinationFolderId, IEnumerable fields = null)` with the ID of the web link and the ID of the folder into which it should be copied. + +```c# +BoxWebLink copiedLink = await client.WebLinksManager.CopyAsync("11111", "22222"); +``` + +Create a Shared Link +-------------------- + +A shared link for a web link can be generated by calling +`WebLinksManager.CreateSharedLinkAsync(string id, BoxSharedLinkRequest sharedLinkRequest, IEnumerable fields = null)`. + +```c# +string webLinkId = "11111"; +var sharedLinkParams = new BoxSharedLinkRequest() +{ + Access = BoxSharedLinkAccessType.open +}; +BoxWebLink link = client.WebLinksManager + .CreateSharedLinkAsync(webLinkId, sharedLinkParams); +string sharedLinkUrl = link.SharedLink.Url; +``` + +Remove a Shared Link +-------------------- + +To remove a shared link from a web link, call +`WebLinksManager.DeleteSharedLinkAsync(string id, IEnumerable fields = null)` +with the ID of the web link. + +```c# +BoxWebLink updatedLink = client.WebLinksManager.DeleteSharedLinkAsync("11111"); +```