Skip to content

Commit db0ef35

Browse files
committed
Merge branch 'master' into white-label-session-support
# Conflicts: # Runtime/Game/LootLockerSDKManager.cs # Runtime/Game/Requests/LootLockerSessionRequest.cs
2 parents 2717c4b + 5705127 commit db0ef35

File tree

4 files changed

+11
-56
lines changed

4 files changed

+11
-56
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);
@@ -60,15 +59,15 @@ public class LootLockerEndPoints
6059
public static EndPointClass createCharacter = new EndPointClass("v1/player/character", LootLockerHTTPMethod.POST);
6160
public static EndPointClass listCharacterTypes = new EndPointClass("v1/player/character/types", LootLockerHTTPMethod.GET);
6261

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

71-
// Asset storage
70+
// Asset storage
7271
[Header("Assets")]
7372
public static EndPointClass gettingContexts = new EndPointClass("v1/contexts", LootLockerHTTPMethod.GET);
7473
public static EndPointClass gettingAssetListWithCount = new EndPointClass("v1/assets/list?count={0}", LootLockerHTTPMethod.GET);
@@ -80,7 +79,7 @@ public class LootLockerEndPoints
8079
public static EndPointClass addingFavouriteAssets = new EndPointClass("v1/asset/{0}/favourite", LootLockerHTTPMethod.POST);
8180
public static EndPointClass removingFavouriteAssets = new EndPointClass("v1/asset/{0}/favourite", LootLockerHTTPMethod.DELETE);
8281

83-
// Asset storage
82+
// Asset storage
8483
[Header("Asset Instances")]
8584
public static EndPointClass getAllKeyValuePairs = new EndPointClass("v1/asset/instance/storage", LootLockerHTTPMethod.GET);
8685
public static EndPointClass getAllKeyValuePairsToAnInstance = new EndPointClass("v1/asset/instance/{0}/storage", LootLockerHTTPMethod.GET);
@@ -91,7 +90,7 @@ public class LootLockerEndPoints
9190
public static EndPointClass deleteKeyValuePair = new EndPointClass("v1/asset/instance/{0}/storage/{1}", LootLockerHTTPMethod.DELETE);
9291
public static EndPointClass inspectALootBox = new EndPointClass("v1/asset/instance/{0}/inspect", LootLockerHTTPMethod.GET);
9392
public static EndPointClass openALootBox = new EndPointClass("v1/asset/instance/{0}/open", LootLockerHTTPMethod.PUT);
94-
93+
9594
// UGC
9695
[Header("UGC")]
9796
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
@@ -262,7 +262,7 @@ public static void CheckWhiteLabelSession(string email, string token, Action<boo
262262

263263
/// <summary>
264264
/// Create new user using the white label login system.
265-
///
265+
///
266266
/// White label platform must be enabled in the web console for this to work.
267267
/// </summary>
268268
public static void StartWhiteLabelSession(string email, string password, Action<LootLockerSessionResponse> onComplete)
@@ -276,22 +276,6 @@ public static void StartWhiteLabelSession(string email, string password, Action<
276276
LootLockerAPIManager.WhiteLabelSession(sessionRequest, onComplete);
277277
}
278278

279-
/// <summary>
280-
/// Create a new session for a Nintendo Switch user
281-
///
282-
/// The Nintendo Switch platform must be enabled in the web console for this to work.
283-
/// </summary>
284-
public static void StartNintendoSwitchSession(string nsa_id_token, Action<LootLockerSessionResponse> onComplete)
285-
{
286-
if (!CheckInitialized())
287-
{
288-
onComplete?.Invoke(LootLockerResponseFactory.SDKNotInitializedError<LootLockerSessionResponse>());
289-
return;
290-
}
291-
LootLockerAPIManager.LootLockerNintendoSwitchSessionRequest sessionRequest = new LootLockerAPIManager.LootLockerNintendoSwitchSessionRequest(nsa_id_token);
292-
LootLockerAPIManager.NintendoSwitchSession(sessionRequest, onComplete);
293-
}
294-
295279
public static void StartWhiteLabelSession(LootLockerWhiteLabelSessionRequest input, Action<LootLockerSessionResponse> onComplete)
296280
{
297281
if (!CheckInitialized())
@@ -352,7 +336,7 @@ public static void EndSession(string deviceId, Action<LootLockerSessionResponse>
352336

353337
/// <summary>
354338
/// Create new user using the white label login system.
355-
///
339+
///
356340
/// White label platform must be enabled in the web console for this to work.
357341
/// </summary>
358342
public static void WhiteLabelLogin(string email, string password, Action<LootLockerWhiteLabelLoginResponse> onComplete)
@@ -420,7 +404,7 @@ public static void WhiteLabelSignUp(string email, string password, Action<LootLo
420404

421405
/// <summary>
422406
/// Request password reset email for the user.
423-
///
407+
///
424408
/// White label platform must be enabled in the web console for this to work.
425409
/// </summary>
426410
public static void WhiteLabelRequestPassword(string email, Action<LootLockerResponse> onComplete)
@@ -436,7 +420,7 @@ public static void WhiteLabelRequestPassword(string email, Action<LootLockerResp
436420

437421
/// <summary>
438422
/// Request verify account email for the user.
439-
///
423+
///
440424
/// White label platform must be enabled in the web console for this to work.
441425
/// Account verification must also be enabled.
442426
/// </summary>

Runtime/Game/Requests/LootLockerSessionRequest.cs

Lines changed: 1 addition & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -173,34 +173,6 @@ public static void GuestSession(LootLockerGetRequest data, Action<LootLockerGues
173173
}, false);
174174
}
175175

176-
public static void NintendoSwitchSession(LootLockerNintendoSwitchSessionRequest data, Action<LootLockerSessionResponse> onComplete)
177-
{
178-
EndPointClass endPoint = LootLockerEndPoints.nintendoSwitchSessionRequest;
179-
180-
string json = "";
181-
if (data == null)
182-
{
183-
return;
184-
}
185-
186-
json = JsonConvert.SerializeObject(data);
187-
LootLockerServerRequest.CallAPI(endPoint.endPoint, endPoint.httpMethod, json, (serverResponse) =>
188-
{
189-
LootLockerSessionResponse response = new LootLockerSessionResponse();
190-
if (string.IsNullOrEmpty(serverResponse.Error))
191-
{
192-
response = JsonConvert.DeserializeObject<LootLockerSessionResponse>(serverResponse.text);
193-
LootLockerConfig.current.UpdateToken(response.session_token, "");
194-
}
195-
196-
response.text = serverResponse.text;
197-
response.success = serverResponse.success;
198-
response.Error = serverResponse.Error; response.statusCode = serverResponse.statusCode;
199-
onComplete?.Invoke(response);
200-
201-
}, false);
202-
}
203-
204176
public static void EndSession(LootLockerGetRequest data, Action<LootLockerSessionResponse> onComplete)
205177
{
206178
EndPointClass endPoint = LootLockerEndPoints.endingSession;
@@ -213,7 +185,7 @@ public static void EndSession(LootLockerGetRequest data, Action<LootLockerSessio
213185
LootLockerSessionResponse response = new LootLockerSessionResponse();
214186
if (string.IsNullOrEmpty(serverResponse.Error))
215187
response = JsonConvert.DeserializeObject<LootLockerSessionResponse>(serverResponse.text);
216-
188+
217189
//LootLockerSDKManager.DebugMessage(serverResponse.text, !string.IsNullOrEmpty(serverResponse.Error));
218190
response.text = serverResponse.text;
219191
response.success = serverResponse.success;

Runtime/Game/Requests/WhiteLabelRequest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ public static void WhiteLabelSignUp(LootLockerWhiteLabelUserRequest input, Actio
153153
return;
154154
}
155155
else
156-
{
156+
{
157157
json = JsonConvert.SerializeObject(input);
158158
}
159159

0 commit comments

Comments
 (0)