diff --git a/src/Microsoft.Graph.Core/Microsoft.Graph.Core.csproj b/src/Microsoft.Graph.Core/Microsoft.Graph.Core.csproj index 8941c102dec..26aa767ae49 100644 --- a/src/Microsoft.Graph.Core/Microsoft.Graph.Core.csproj +++ b/src/Microsoft.Graph.Core/Microsoft.Graph.Core.csproj @@ -13,9 +13,10 @@ Microsoft.Graph.Core Microsoft Office365;Graph;GraphServiceClient;Outlook;OneDrive;AzureAD;GraphAPI;Productivity;SharePoint;Intune;SDK -December 2018 Release Summary (version 1.13.0) +January 2019 Release Summary (version 1.13.0-preview.2) - Authentication handler added. +- Removed Newtonsoft.Json package reference upper bound limitation. https://developer.microsoft.com/graph http://aka.ms/devservicesagreement @@ -35,7 +36,7 @@ December 2018 Release Summary (version 1.13.0) false 35MSSharedLib1024.snk true - 1.13.0-preview + 1.13.0-preview.2 bin\Release\netstandard1.1\Microsoft.Graph.Core.xml @@ -54,7 +55,7 @@ December 2018 Release Summary (version 1.13.0) - + diff --git a/src/Microsoft.Graph/Microsoft.Graph.csproj b/src/Microsoft.Graph/Microsoft.Graph.csproj index caa4d4510a8..053c31417f1 100644 --- a/src/Microsoft.Graph/Microsoft.Graph.csproj +++ b/src/Microsoft.Graph/Microsoft.Graph.csproj @@ -13,7 +13,7 @@ Microsoft.Graph Microsoft Office365;Graph;GraphServiceClient;Outlook;OneDrive;AzureAD;GraphAPI;Productivity;SharePoint;Intune;SDK -December 2018 Release Summary (version 1.13.0) +January 2019 Release Summary (version 1.13.0-preview.2) New functionality - Added new Teams API functionality. @@ -25,6 +25,7 @@ Updated functionality - Device is updated with the MemberOf relationship. - Group is updated with the isArchived property and Team relationship. - User is updated with the JoinedTeams relationship. +- Removed Newtonsoft.Json package reference upper bound limitation. https://developer.microsoft.com/graph http://aka.ms/devservicesagreement @@ -44,7 +45,7 @@ Updated functionality false 35MSSharedLib1024.snk true - 1.13.0-preview + 1.13.0-preview.2 bin\Release\Microsoft.Graph.xml @@ -57,7 +58,7 @@ Updated functionality - + diff --git a/src/Microsoft.Graph/Requests/Extensions/TeamRequestExtensions.cs b/src/Microsoft.Graph/Requests/Extensions/TeamRequestExtensions.cs new file mode 100644 index 00000000000..91dc515f934 --- /dev/null +++ b/src/Microsoft.Graph/Requests/Extensions/TeamRequestExtensions.cs @@ -0,0 +1,50 @@ +using System.Threading; + +namespace Microsoft.Graph +{ + public partial interface ITeamRequest + { + /// + /// Creates the specified Team using PUT. + /// + /// The Team to create. + /// The created Team. + System.Threading.Tasks.Task PutAsync(Team teamToCreate); + + /// + /// Creates the specified Team using PUT. + /// + /// The Team to create. + /// The for the request. + /// The created Team. + System.Threading.Tasks.Task PutAsync(Team teamToCreate, CancellationToken cancellationToken); + } + + public partial class TeamRequest + { + /// + /// Creates the specified Team using PUT. + /// + /// The Team to create. + /// The created Team. + public System.Threading.Tasks.Task PutAsync(Team teamToCreate) + { + return this.PutAsync(teamToCreate, CancellationToken.None); + } + + /// + /// Creates the specified Team using PUT. + /// + /// The Team to create. + /// The for the request. + /// The created Team. + public async System.Threading.Tasks.Task PutAsync(Team teamToCreate, CancellationToken cancellationToken) + { + this.ContentType = "application/json"; + this.Method = "PUT"; + var newEntity = await this.SendAsync(teamToCreate, cancellationToken).ConfigureAwait(false); + this.InitializeCollectionProperties(newEntity); + return newEntity; + } + } +} \ No newline at end of file diff --git a/tests/Microsoft.Graph.Test/Microsoft.Graph.Test.csproj b/tests/Microsoft.Graph.Test/Microsoft.Graph.Test.csproj index 42a5cf052cc..6285f7634b6 100644 --- a/tests/Microsoft.Graph.Test/Microsoft.Graph.Test.csproj +++ b/tests/Microsoft.Graph.Test/Microsoft.Graph.Test.csproj @@ -105,6 +105,7 @@ + diff --git a/tests/Microsoft.Graph.Test/Requests/Functional/GroupTests.cs b/tests/Microsoft.Graph.Test/Requests/Functional/GroupTests.cs new file mode 100644 index 00000000000..34c991827e5 --- /dev/null +++ b/tests/Microsoft.Graph.Test/Requests/Functional/GroupTests.cs @@ -0,0 +1,41 @@ +using System; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using System.Collections.Generic; +using Async = System.Threading.Tasks; + +namespace Microsoft.Graph.Test.Requests.Functional +{ + [Ignore] + [TestClass] + public class GroupTests : GraphTestBase + { + /// + /// Create a team on a group. + /// + [TestMethod] + public async Async.Task GroupCreateTeam() + { + try + { + // Get a groups collection. We'll use the first entry to add the team. Results in a call to the service. + IGraphServiceGroupsCollectionPage groupPage = await graphClient.Groups.Request().GetAsync(); + + // Create a team with settings. + Team team = new Team() + { + MemberSettings = new TeamMemberSettings() + { + AllowCreateUpdateChannels = true + } + }; + + // Add a team to the group. Results in a call to the service. + await graphClient.Groups[groupPage[8].Id].Team.Request().PutAsync(team); + } + catch (ServiceException e) + { + Assert.Fail(e.Error.ToString()); + } + } + } +} \ No newline at end of file