@@ -28,6 +28,7 @@ public class DestinyAPI {
2828 private static String accessToken = null ;
2929 private static String refreshToken = null ;
3030 private static OAuthManager oam = null ;
31+ private static boolean debugEnabled = false ;
3132
3233 public DestinyAPI setApiKey (String apiKey ) {
3334 DestinyAPI .apiKey = apiKey ;
@@ -68,6 +69,18 @@ public DestinyAPI setRefreshToken(String refreshToken) {
6869 return this ;
6970 }
7071
72+ public DestinyAPI enableDebugMode () {
73+ DestinyAPI .debugEnabled = true ;
74+
75+ return this ;
76+ }
77+
78+ public DestinyAPI disableDebugMode () {
79+ DestinyAPI .debugEnabled = false ;
80+
81+ return this ;
82+ }
83+
7184 /**
7285 * Set the OAuth management class
7386 * The class passed in this parameter must "extends OAuthManager"
@@ -99,7 +112,7 @@ public static BungieUser getMemberFromSteamID(String steamID) {
99112 }
100113
101114 private static BungieUser getMemberFromPlatformID (String platformName , String platformID ) {
102- JsonObject jsonObject = new HttpUtils ().urlRequestGET ("https://www.bungie.net/Platform/User/GetMembershipFromHardLinkedCredential/" + platformName + "/" + platformID + "/" ).getAsJsonObject ("Responseg " );
115+ JsonObject jsonObject = new HttpUtils ().urlRequestGET ("https://www.bungie.net/Platform/User/GetMembershipFromHardLinkedCredential/" + platformName + "/" + platformID + "/" ).getAsJsonObject ("Response " );
103116
104117 return new BungieUser (jsonObject .get ("membershipId" ).getAsString ());
105118 }
@@ -162,4 +175,6 @@ public static String getRefreshToken() {
162175 return oam .getRefreshToken ();
163176 }
164177
178+ public static boolean isDebugEnabled () { return DestinyAPI .debugEnabled ; }
179+
165180}
0 commit comments