Merge pull request #11 from ArcticXWolf/master
Ferox [2016-07-19 23:43:27]
Merge pull request #11 from ArcticXWolf/master
Added switch between PTC and google login.
diff --git a/PokemonGo/RocketAPI/Console/Program.cs b/PokemonGo/RocketAPI/Console/Program.cs
index e35daaa..0cff61b 100644
--- a/PokemonGo/RocketAPI/Console/Program.cs
+++ b/PokemonGo/RocketAPI/Console/Program.cs
@@ -24,8 +24,14 @@ namespace PokemonGo.RocketAPI.Console
{
var client = new Client(Settings.DefaultLatitude, Settings.DefaultLongitude);
- //await client.LoginPtc("FeroxRev", "Sekret");
- await client.LoginGoogle(Settings.DeviceId, Settings.Email, Settings.LongDurationToken);
+ if (Settings.UsePTC)
+ {
+ await client.LoginPtc(Settings.PtcUsername, Settings.PtcPassword);
+ }
+ else
+ {
+ await client.LoginGoogle(Settings.DeviceId, Settings.Email, Settings.LongDurationToken);
+ }
var serverResponse = await client.GetServer();
var profile = await client.GetProfile();
var settings = await client.GetSettings();
diff --git a/PokemonGo/RocketAPI/Settings.cs b/PokemonGo/RocketAPI/Settings.cs
index 20e1d4c..87b81db 100644
--- a/PokemonGo/RocketAPI/Settings.cs
+++ b/PokemonGo/RocketAPI/Settings.cs
@@ -9,6 +9,9 @@ namespace PokemonGo.RocketAPI
public static class Settings
{
//Fetch these settings from intercepting the /auth call in headers and body (only needed for google auth)
+ public const bool UsePTC = true;
+ public const string PtcUsername = "User";
+ public const string PtcPassword = "alligator2";
public const string DeviceId = "cool-device-id";
public const string Email = "fake@gmail.com";
public const string ClientSig = "fake";
You may download the files in Public Git.