Skip to content

Commit 4c94f86

Browse files
authored
Revert "Nintendo Switch support"
1 parent 5cc9976 commit 4c94f86

File tree

4 files changed

+13
-71
lines changed

4 files changed

+13
-71
lines changed

Runtime/Client/LootLockerEndPoints.cs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,13 @@
44

55
namespace LootLocker
66
{
7-
public class LootLockerEndPoints
7+
public class LootLockerEndPoints
88
{
99
// Authentication
1010
[Header("Authentication")]
1111
public static EndPointClass playerVerification = new EndPointClass("v1/player/verify", LootLockerHTTPMethod.POST);
1212
public static EndPointClass authenticationRequest = new EndPointClass("v2/session", LootLockerHTTPMethod.POST);
1313
public static EndPointClass guestSessionRequest = new EndPointClass("v2/session/guest", LootLockerHTTPMethod.POST);
14-
public static EndPointClass nintendoSwitchSessionRequest = new EndPointClass("session/nintendo-switch", LootLockerHTTPMethod.POST);
1514
public static EndPointClass whiteLabelLoginSessionRequest = new EndPointClass("v2/session/white-label", LootLockerHTTPMethod.POST);
1615
public static EndPointClass endingSession = new EndPointClass("v1/session", LootLockerHTTPMethod.DELETE);
1716
public static EndPointClass initialAuthenticationRequest = new EndPointClass("v1/session", LootLockerHTTPMethod.POST);
@@ -58,15 +57,15 @@ public class LootLockerEndPoints
5857
public static EndPointClass createCharacter = new EndPointClass("v1/player/character", LootLockerHTTPMethod.POST);
5958
public static EndPointClass listCharacterTypes = new EndPointClass("v1/player/character/types", LootLockerHTTPMethod.GET);
6059

61-
// Persistentplayer storage
60+
// Persistentplayer storage
6261
[Header("Persitent Player Storage")]
6362
public static EndPointClass getEntirePersistentStorage = new EndPointClass("v1/player/storage", LootLockerHTTPMethod.GET);
6463
public static EndPointClass getSingleKeyFromPersitenctStorage = new EndPointClass("v1/player/storage?key={0}", LootLockerHTTPMethod.GET);
6564
public static EndPointClass updateOrCreateKeyValue = new EndPointClass("v1/player/storage", LootLockerHTTPMethod.POST);
6665
public static EndPointClass deleteKeyValue = new EndPointClass("v1/player/storage?key={0}", LootLockerHTTPMethod.DELETE);
6766
public static EndPointClass getOtherPlayersPublicKeyValuePairs = new EndPointClass("v1/player/{0}/storage", LootLockerHTTPMethod.GET);
6867

69-
// Asset storage
68+
// Asset storage
7069
[Header("Assets")]
7170
public static EndPointClass gettingContexts = new EndPointClass("v1/contexts", LootLockerHTTPMethod.GET);
7271
public static EndPointClass gettingAssetListWithCount = new EndPointClass("v1/assets/list?count={0}", LootLockerHTTPMethod.GET);
@@ -78,7 +77,7 @@ public class LootLockerEndPoints
7877
public static EndPointClass addingFavouriteAssets = new EndPointClass("v1/asset/{0}/favourite", LootLockerHTTPMethod.POST);
7978
public static EndPointClass removingFavouriteAssets = new EndPointClass("v1/asset/{0}/favourite", LootLockerHTTPMethod.DELETE);
8079

81-
// Asset storage
80+
// Asset storage
8281
[Header("Asset Instances")]
8382
public static EndPointClass getAllKeyValuePairs = new EndPointClass("v1/asset/instance/storage", LootLockerHTTPMethod.GET);
8483
public static EndPointClass getAllKeyValuePairsToAnInstance = new EndPointClass("v1/asset/instance/{0}/storage", LootLockerHTTPMethod.GET);
@@ -89,7 +88,7 @@ public class LootLockerEndPoints
8988
public static EndPointClass deleteKeyValuePair = new EndPointClass("v1/asset/instance/{0}/storage/{1}", LootLockerHTTPMethod.DELETE);
9089
public static EndPointClass inspectALootBox = new EndPointClass("v1/asset/instance/{0}/inspect", LootLockerHTTPMethod.GET);
9190
public static EndPointClass openALootBox = new EndPointClass("v1/asset/instance/{0}/open", LootLockerHTTPMethod.PUT);
92-
91+
9392
// UGC
9493
[Header("UGC")]
9594
public static EndPointClass creatingAnAssetCandidate = new EndPointClass("v1/player/assets/candidates", LootLockerHTTPMethod.POST);

Runtime/Game/LootLockerSDKManager.cs

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ public static void StartSteamSession(string steamId64, Action<LootLockerSessionR
192192

193193
/// <summary>
194194
/// Create new user using the white label login system.
195-
///
195+
///
196196
/// White label platform must be enabled in the web console for this to work.
197197
/// </summary>
198198
public static void StartWhiteLabelSession(string email, string password, Action<LootLockerSessionResponse> onComplete)
@@ -206,22 +206,6 @@ public static void StartWhiteLabelSession(string email, string password, Action<
206206
LootLockerAPIManager.WhiteLabelSession(sessionRequest, onComplete);
207207
}
208208

209-
/// <summary>
210-
/// Create a new session for a Nintendo Switch user
211-
///
212-
/// The Nintendo Switch platform must be enabled in the web console for this to work.
213-
/// </summary>
214-
public static void StartNintendoSwitchSession(string nsa_id_token, Action<LootLockerSessionResponse> onComplete)
215-
{
216-
if (!CheckInitialized())
217-
{
218-
onComplete?.Invoke(LootLockerResponseFactory.SDKNotInitializedError<LootLockerSessionResponse>());
219-
return;
220-
}
221-
LootLockerNintendoSwitchSessionRequest sessionRequest = new LootLockerNintendoSwitchSessionRequest(nsa_id_token);
222-
LootLockerAPIManager.NintendoSwitchSession(sessionRequest, onComplete);
223-
}
224-
225209
public static void EndSession(string deviceId, Action<LootLockerSessionResponse> onComplete)
226210
{
227211
if (!CheckInitialized())
@@ -243,7 +227,7 @@ public static void EndSession(string deviceId, Action<LootLockerSessionResponse>
243227

244228
/// <summary>
245229
/// Create new user using the white label login system.
246-
///
230+
///
247231
/// White label platform must be enabled in the web console for this to work.
248232
/// </summary>
249233
public static void WhiteLabelSignUp(string email, string password, Action<LootLockerWhiteLabelSignupResponse> onComplete)
@@ -265,7 +249,7 @@ public static void WhiteLabelSignUp(string email, string password, Action<LootLo
265249

266250
/// <summary>
267251
/// Request password reset email for the user.
268-
///
252+
///
269253
/// White label platform must be enabled in the web console for this to work.
270254
/// </summary>
271255
public static void WhiteLabelRequestPassword(string email, Action<LootLockerResponse> onComplete)
@@ -281,7 +265,7 @@ public static void WhiteLabelRequestPassword(string email, Action<LootLockerResp
281265

282266
/// <summary>
283267
/// Request verify account email for the user.
284-
///
268+
///
285269
/// White label platform must be enabled in the web console for this to work.
286270
/// Account verification must also be enabled.
287271
/// </summary>

Runtime/Game/Requests/LootLockerSessionRequest.cs

Lines changed: 3 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -42,23 +42,10 @@ public LootLockerWhiteLabelSessionRequest(string email, string password)
4242
}
4343
}
4444

45-
[System.Serializable]
46-
public class LootLockerNintendoSwitchSessionRequest : LootLockerGetRequest
47-
{
48-
public string game_key => LootLockerConfig.current.apiKey?.ToString();
49-
public string nsa_id_token { get; private set; }
50-
public string game_version => LootLockerConfig.current.game_version;
51-
public bool development_mode => LootLockerConfig.current.developmentMode;
52-
public LootLockerNintendoSwitchSessionRequest(string nsa_id_token)
53-
{
54-
this.nsa_id_token = nsa_id_token;
55-
}
56-
}
57-
5845
[System.Serializable]
5946
public class LootLockerSessionResponse : LootLockerResponse
6047
{
61-
48+
6249
public string session_token { get; set; }
6350
public int player_id { get; set; }
6451
public bool seen_before { get; set; }
@@ -116,7 +103,7 @@ public static void Session(LootLockerGetRequest data, Action<LootLockerSessionRe
116103
}, false);
117104
}
118105

119-
public static void WhiteLabelSession(LootLockerWhiteLabelSessionRequest data, Action<LootLockerSessionResponse> onComplete)
106+
public static void WhiteLabelSession(LootLockerGetRequest data, Action<LootLockerSessionResponse> onComplete)
120107
{
121108
EndPointClass endPoint = LootLockerEndPoints.whiteLabelLoginSessionRequest;
122109

@@ -168,34 +155,6 @@ public static void GuestSession(LootLockerGetRequest data, Action<LootLockerGues
168155
}, false);
169156
}
170157

171-
public static void NintendoSwitchSession(LootLockerNintendoSwitchSessionRequest data, Action<LootLockerSessionResponse> onComplete)
172-
{
173-
EndPointClass endPoint = LootLockerEndPoints.nintendoSwitchSessionRequest;
174-
175-
string json = "";
176-
if (data == null)
177-
{
178-
return;
179-
}
180-
181-
json = JsonConvert.SerializeObject(data);
182-
LootLockerServerRequest.CallAPI(endPoint.endPoint, endPoint.httpMethod, json, (serverResponse) =>
183-
{
184-
LootLockerSessionResponse response = new LootLockerSessionResponse();
185-
if (string.IsNullOrEmpty(serverResponse.Error))
186-
{
187-
response = JsonConvert.DeserializeObject<LootLockerSessionResponse>(serverResponse.text);
188-
LootLockerConfig.current.UpdateToken(response.session_token, (data as LootLockerSessionRequest)?.player_identifier);
189-
}
190-
191-
response.text = serverResponse.text;
192-
response.success = serverResponse.success;
193-
response.Error = serverResponse.Error; response.statusCode = serverResponse.statusCode;
194-
onComplete?.Invoke(response);
195-
196-
}, false);
197-
}
198-
199158
public static void EndSession(LootLockerGetRequest data, Action<LootLockerSessionResponse> onComplete)
200159
{
201160
EndPointClass endPoint = LootLockerEndPoints.endingSession;
@@ -208,7 +167,7 @@ public static void EndSession(LootLockerGetRequest data, Action<LootLockerSessio
208167
LootLockerSessionResponse response = new LootLockerSessionResponse();
209168
if (string.IsNullOrEmpty(serverResponse.Error))
210169
response = JsonConvert.DeserializeObject<LootLockerSessionResponse>(serverResponse.text);
211-
170+
212171
//LootLockerSDKManager.DebugMessage(serverResponse.text, !string.IsNullOrEmpty(serverResponse.Error));
213172
response.text = serverResponse.text;
214173
response.success = serverResponse.success;

Runtime/Game/Requests/WhiteLabelRequest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public static void WhiteLabelSignUp(LootLockerWhiteLabelUserRequest input, Actio
4444
return;
4545
}
4646
else
47-
{
47+
{
4848
json = JsonConvert.SerializeObject(input);
4949
}
5050

0 commit comments

Comments
 (0)