diff --git a/PelotonData.sln b/PelotonData.sln index 7e4aae1..e3a4675 100644 --- a/PelotonData.sln +++ b/PelotonData.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.28010.2046 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.29009.5 MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PelotonData", "PelotonData\PelotonData.csproj", "{08C3882F-9669-4C82-A005-1BE8657732B7}" EndProject @@ -28,7 +28,6 @@ Global {AC76E67D-6BA5-4E83-B07C-92669A68B2F1}.Debug|Any CPU.ActiveCfg = Debug {AC76E67D-6BA5-4E83-B07C-92669A68B2F1}.Release|Any CPU.ActiveCfg = Release {0D4FCDED-D5EA-4D27-B887-4E8C8F9037D6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {0D4FCDED-D5EA-4D27-B887-4E8C8F9037D6}.Debug|Any CPU.Build.0 = Debug|Any CPU {0D4FCDED-D5EA-4D27-B887-4E8C8F9037D6}.Release|Any CPU.ActiveCfg = Release|Any CPU {0D4FCDED-D5EA-4D27-B887-4E8C8F9037D6}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection diff --git a/PelotonData/PelotonDataDownloader.cs b/PelotonData/PelotonDataDownloader.cs index 6286e98..8da1ec6 100644 --- a/PelotonData/PelotonDataDownloader.cs +++ b/PelotonData/PelotonDataDownloader.cs @@ -74,13 +74,20 @@ async Task RunAsync(string username, string password) public async Task AuthenticateAsync(string user, string password, ILogger logger, string SaveJsonPath=null) { - string authURL = "https://api.pelotoncycle.com/auth/login"; + string authURL = "https://api.onepeloton.com/auth/login"; var info = new { password = password, username_or_email = user }; string infoAsString = JsonConvert.SerializeObject(info); using (var client = new WebClient()) { client.Headers[HttpRequestHeader.ContentType] = "application/json"; + + ServicePointManager.Expect100Continue = true; + ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12; + + ServicePointManager.ServerCertificateValidationCallback = delegate { return true; }; + + var responseTask = client.UploadStringTaskAsync(authURL, infoAsString); string response = await responseTask; diff --git a/PelotonData/Properties/AssemblyInfo.cs b/PelotonData/Properties/AssemblyInfo.cs index 57d3615..8302a52 100644 --- a/PelotonData/Properties/AssemblyInfo.cs +++ b/PelotonData/Properties/AssemblyInfo.cs @@ -6,11 +6,10 @@ // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("PelotonData")] -[assembly: AssemblyDescription("")] +[assembly: AssemblyDescription("Peloton Data Download Library")] [assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] +[assembly: AssemblyCompany("Christian Bird")] [assembly: AssemblyProduct("PelotonData")] -[assembly: AssemblyCopyright("Copyright © 2018")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] @@ -32,5 +31,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: AssemblyVersion("1.0.2.0")] +[assembly: AssemblyFileVersion("1.0.2.0")] diff --git a/PelotonDataGui/PelotonDataGui.csproj b/PelotonDataGui/PelotonDataGui.csproj index 0d8ec65..1533013 100644 --- a/PelotonDataGui/PelotonDataGui.csproj +++ b/PelotonDataGui/PelotonDataGui.csproj @@ -25,7 +25,7 @@ false true 0 - 0.1.0.%2a + 1.0.1.%2a false true @@ -48,6 +48,7 @@ prompt 4 + ..\packages\WindowsAPICodePack-Core.1.1.1\lib\Microsoft.WindowsAPICodePack.dll diff --git a/PelotonDataGui/Properties/AssemblyInfo.cs b/PelotonDataGui/Properties/AssemblyInfo.cs index 24926b7..937f66e 100644 --- a/PelotonDataGui/Properties/AssemblyInfo.cs +++ b/PelotonDataGui/Properties/AssemblyInfo.cs @@ -12,7 +12,6 @@ [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("Christian Bird")] [assembly: AssemblyProduct("Peloton Data Download Utility")] -[assembly: AssemblyCopyright("Copyright © 2018")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] @@ -51,5 +50,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("0.1.0.0")] -[assembly: AssemblyFileVersion("0.1.0.0")] +[assembly: AssemblyVersion("1.0.2.0")] +[assembly: AssemblyFileVersion("1.0.2.0")]