From 68b7297482da23cdb1180fd4f8fd4dbb83c9e0c5 Mon Sep 17 00:00:00 2001 From: Jonas Syrstad Date: Fri, 30 Nov 2018 20:28:54 +0100 Subject: [PATCH 1/2] Added Me ChangePassword operation --- src/GraphLite/GraphApiClient.Me.cs | 29 +++++++++++++++++++++++++++++ src/GraphLite/GraphLite.csproj | 8 ++++++++ 2 files changed, 37 insertions(+) create mode 100644 src/GraphLite/GraphApiClient.Me.cs diff --git a/src/GraphLite/GraphApiClient.Me.cs b/src/GraphLite/GraphApiClient.Me.cs new file mode 100644 index 0000000..24e8ac9 --- /dev/null +++ b/src/GraphLite/GraphApiClient.Me.cs @@ -0,0 +1,29 @@ +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.Text; +using System.Threading.Tasks; + +namespace GraphLite +{ + public partial class GraphApiClient + { + + public async Task MeChangePassword(ChangePasswordRequest passwordRequest) + { + var resource = $"me/changePassword"; + var responseMessage = await DoExecuteRequest(HttpMethod.Post, resource); + var response = await responseMessage.Content.ReadAsStringAsync(); + } + + } + + public class ChangePasswordRequest + { + [JsonProperty("currentPassword")] + public string CurrentPassword { get; set; } + + [JsonProperty("newPassword")] + public string NewPassword { get; set; } + } +} diff --git a/src/GraphLite/GraphLite.csproj b/src/GraphLite/GraphLite.csproj index 94242ba..d5e9dab 100644 --- a/src/GraphLite/GraphLite.csproj +++ b/src/GraphLite/GraphLite.csproj @@ -19,6 +19,14 @@ 1.3.0 + + + + + + + + From 671fd0aacf729723994dd09898b272ba71a0ff35 Mon Sep 17 00:00:00 2001 From: Jonas Syrstad Date: Fri, 30 Nov 2018 20:33:50 +0100 Subject: [PATCH 2/2] set the file as C# compiler --- src/GraphLite/GraphApiClient.Me.cs | 2 +- src/GraphLite/GraphLite.csproj | 8 -------- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/src/GraphLite/GraphApiClient.Me.cs b/src/GraphLite/GraphApiClient.Me.cs index 24e8ac9..7b36e72 100644 --- a/src/GraphLite/GraphApiClient.Me.cs +++ b/src/GraphLite/GraphApiClient.Me.cs @@ -1,6 +1,7 @@ using Newtonsoft.Json; using System; using System.Collections.Generic; +using System.Net.Http; using System.Text; using System.Threading.Tasks; @@ -8,7 +9,6 @@ namespace GraphLite { public partial class GraphApiClient { - public async Task MeChangePassword(ChangePasswordRequest passwordRequest) { var resource = $"me/changePassword"; diff --git a/src/GraphLite/GraphLite.csproj b/src/GraphLite/GraphLite.csproj index d5e9dab..94242ba 100644 --- a/src/GraphLite/GraphLite.csproj +++ b/src/GraphLite/GraphLite.csproj @@ -19,14 +19,6 @@ 1.3.0 - - - - - - - -