Skip to content

Commit 5529b3c

Browse files
Add method for calling the nintendo switch session endpoint
1 parent a6226ea commit 5529b3c

File tree

1 file changed

+20
-4
lines changed

1 file changed

+20
-4
lines changed

Runtime/Game/LootLockerSDKManager.cs

Lines changed: 20 additions & 4 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,6 +206,22 @@ 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+
209225
public static void EndSession(string deviceId, Action<LootLockerSessionResponse> onComplete)
210226
{
211227
if (!CheckInitialized())
@@ -227,7 +243,7 @@ public static void EndSession(string deviceId, Action<LootLockerSessionResponse>
227243

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

250266
/// <summary>
251267
/// Request password reset email for the user.
252-
///
268+
///
253269
/// White label platform must be enabled in the web console for this to work.
254270
/// </summary>
255271
public static void WhiteLabelRequestPassword(string email, Action<LootLockerResponse> onComplete)
@@ -265,7 +281,7 @@ public static void WhiteLabelRequestPassword(string email, Action<LootLockerResp
265281

266282
/// <summary>
267283
/// Request verify account email for the user.
268-
///
284+
///
269285
/// White label platform must be enabled in the web console for this to work.
270286
/// Account verification must also be enabled.
271287
/// </summary>

0 commit comments

Comments
 (0)