Skip to content
This repository was archived by the owner on Apr 1, 2025. It is now read-only.

Commit cbca167

Browse files
committed
Version 2.2.1.0
1 parent 5a64a78 commit cbca167

File tree

10 files changed

+482
-114
lines changed

10 files changed

+482
-114
lines changed

Demo/DemoApplication.csproj

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,11 @@
8989
<Name>.NET Standard API</Name>
9090
</ProjectReference>
9191
</ItemGroup>
92+
<ItemGroup>
93+
<PackageReference Include="Newtonsoft.Json">
94+
<Version>12.0.2</Version>
95+
</PackageReference>
96+
</ItemGroup>
9297
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
9398
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
9499
Other similar extension points exist, see Microsoft.Common.targets.

DotNetStandardApi/.NET Standard API.csproj

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,30 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
44
<TargetFramework>netstandard2.0</TargetFramework>
55
<AssemblyName>KoenZomers.OneDrive.Api</AssemblyName>
66
<SignAssembly>true</SignAssembly>
77
<AssemblyOriginatorKeyFile>KoenZomers.OneDrive.Api.snk</AssemblyOriginatorKeyFile>
8-
<Version>2.2.0.0</Version>
8+
<Version>2.2.1.0</Version>
99
<Authors>Koen Zomers</Authors>
1010
<Company>Koen Zomers</Company>
1111
<Description>API in .NET Standard to communicate with OneDrive Personal and OneDrive for Business</Description>
1212
<PackageProjectUrl>https://github.com/KoenZomers/OneDriveAPI</PackageProjectUrl>
1313
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
14-
<PackageReleaseNotes>- Converted the API from the .NET Framework to .NET Standard 2.0 so it can also be used on non Windows environments
15-
- Upgraded to use Newtonsoft JSON 12.0.1
16-
- Upgraded the Demo Application to use a proper namespace and be compiled against the .NET Framework 4.6.2 instead of 4.5.2
17-
</PackageReleaseNotes>
14+
<PackageReleaseNotes>- Added several UpdateFile methods to allow for updating the contents of an existing file. The normal UploadFile throws an exception in some cases if you try to upload a file to the same location, especially when the item is shared with the user and resides on another drive. To aid in that scenario, use the UpdateFile methods
15+
- Added OneDriveSharedItem entity which will expose information on the owner of a shared item
16+
- Several smaller fixes</PackageReleaseNotes>
1817
<PackageLicenseUrl>https://github.com/KoenZomers/OneDriveAPI/blob/master/LICENSE.md</PackageLicenseUrl>
1918
<Copyright>Koen Zomers</Copyright>
19+
<RootNamespace>KoenZomers.OneDrive.Api</RootNamespace>
2020
</PropertyGroup>
2121

2222
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
23-
<DocumentationFile>C:\Code\GitHub\OneDriveAPI\DotNetStandardApi\KoenZomers.OneDrive.Api.xml</DocumentationFile>
23+
<DocumentationFile>KoenZomers.OneDrive.Api.xml</DocumentationFile>
2424
</PropertyGroup>
2525

2626
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
27-
<DocumentationFile>C:\Code\GitHub\OneDriveAPI\DotNetStandardApi\KoenZomers.OneDrive.Api.xml</DocumentationFile>
27+
<DocumentationFile>KoenZomers.OneDrive.Api.xml</DocumentationFile>
2828
</PropertyGroup>
2929

3030
<ItemGroup>

DotNetStandardApi/Entities/OneDriveItem.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,5 +164,11 @@ public class OneDriveItem : OneDriveItemBase
164164
/// </summary>
165165
[JsonProperty("remoteItem", DefaultValueHandling = DefaultValueHandling.Ignore)]
166166
public OneDriveRemoteItem RemoteItem{ get; set; }
167+
168+
/// <summary>
169+
/// Information about the owner of a shared item
170+
/// </summary>
171+
[JsonProperty("shared")]
172+
public OneDriveSharedItem Shared { get; set; }
167173
}
168174
}

DotNetStandardApi/Entities/OneDriveRemoteItem.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,5 +84,11 @@ public class OneDriveRemoteItem : OneDriveItemBase
8484
/// </summary>
8585
[JsonProperty("webDavUrl", NullValueHandling = NullValueHandling.Ignore)]
8686
public string WebDavUrl { get; set; }
87+
88+
/// <summary>
89+
/// Information about the owner of the shared item
90+
/// </summary>
91+
[JsonProperty("shared")]
92+
public OneDriveSharedItem Shared { get; set; }
8793
}
8894
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
using Newtonsoft.Json;
2+
3+
namespace KoenZomers.OneDrive.Api.Entities
4+
{
5+
/// <summary>
6+
/// Represents an item that has been shared
7+
/// </summary>
8+
public class OneDriveSharedItem
9+
{
10+
/// <summary>
11+
/// The user account that owns the shared item
12+
/// </summary>
13+
[JsonProperty("owner")]
14+
public OneDriveIdentitySet Owner { get; set; }
15+
}
16+
}
Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,40 @@
1-
namespace KoenZomers.OneDrive.Api.Entities
1+
using Newtonsoft.Json;
2+
3+
namespace KoenZomers.OneDrive.Api.Entities
24
{
5+
/// <summary>
6+
/// Represents an user
7+
/// </summary>
38
public class OneDriveUserProfile : OneDriveItemBase
49
{
10+
/// <summary>
11+
/// Unique identifier of the user
12+
/// </summary>
13+
[JsonProperty("id", NullValueHandling = NullValueHandling.Ignore)]
514
public string Id { get; set; }
615

16+
/// <summary>
17+
/// Friendly name of the user
18+
/// </summary>
19+
[JsonProperty("displayName", NullValueHandling = NullValueHandling.Ignore)]
720
public string DisplayName { get; set; }
821

22+
/// <summary>
23+
/// E-mail address of the user
24+
/// </summary>
25+
[JsonProperty("emailAddress", NullValueHandling = NullValueHandling.Ignore)]
926
public string EmailAddress { get; set; }
1027

28+
/// <summary>
29+
/// Username of the user
30+
/// </summary>
31+
[JsonProperty("username", NullValueHandling = NullValueHandling.Ignore)]
1132
public string Username { get; set; }
1233

34+
/// <summary>
35+
/// Organization the user belongs to
36+
/// </summary>
37+
[JsonProperty("organization", NullValueHandling = NullValueHandling.Ignore)]
1338
public string Organization { get; set; }
1439
}
1540
}

0 commit comments

Comments
 (0)