Skip to content

Commit ff282bb

Browse files
kirre-bylundMikkel Sørensen
authored andcommitted
Remove interface using a define symbol
1 parent 1669e46 commit ff282bb

File tree

3 files changed

+13
-18
lines changed

3 files changed

+13
-18
lines changed

Runtime/Client/LootLockerEndPoints.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public class LootLockerEndPoints
3434
// Account Linking
3535
[Header("Account Linking")]
3636
public static EndPointClass StartAccountLinkingProcess = new EndPointClass("upa/link/start", LootLockerHTTPMethod.POST);
37-
public static EndPointClass CheckStatusOfAccountLinkingProcess = new EndPointClass("upa/link/{0}", LootLockerHTTPMethod.GET);
37+
public static EndPointClass CheckAccountLinkingProcessStatus = new EndPointClass("upa/link/{0}", LootLockerHTTPMethod.GET);
3838
public static EndPointClass CancelAccountLinkingProcess = new EndPointClass("upa/link/{0}", LootLockerHTTPMethod.DELETE);
3939
public static EndPointClass UnlinkProviderFromAccount = new EndPointClass("player/providers/{0}", LootLockerHTTPMethod.DELETE);
4040

Runtime/Game/LootLockerSDKManager.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,6 @@
77
using LootLocker.LootLockerEnums;
88
using static LootLocker.LootLockerConfig;
99
using System.Linq;
10-
using static LootLocker.Requests.CurrentPlatform;
11-
using static System.Net.WebRequestMethods;
12-
using static System.Runtime.CompilerServices.RuntimeHelpers;
13-
using System.Diagnostics;
1410
using File = System.IO.File;
1511
#if UNITY_EDITOR
1612
using UnityEditor;
@@ -1065,12 +1061,14 @@ public static void WhiteLabelLoginAndStartSession(string email, string password,
10651061

10661062
#endregion
10671063

1064+
#if LOOTLOCKER_ENABLE_ACCOUNT_LINKING
1065+
10681066
#region Account Linking
10691067

10701068
/// <summary>
10711069
/// Start an account linking process on behalf of the currently signed in player
10721070
/// When you want to link an additional provider to a player, you start by initiating an account link.The player can then navigate to the online link flow using the code_page_url and code, or the qr_code and continue the linking process.
1073-
/// For the duration of the linking process you can check the status using the CheckStatusOfAccountLinkingProcess method.
1071+
/// For the duration of the linking process you can check the status using the CheckAccountLinkingProcessStatus method.
10741072
/// Returned from this method is the ID of the linking process, make sure to save that so that you can check the status of the process later.
10751073
/// https://ref.lootlocker.com/game-api/#start-account-link
10761074
/// </summary>
@@ -1094,15 +1092,15 @@ public static void StartAccountLinkingProcess(Action<LootLockerAccountLinkStartR
10941092
/// </summary>
10951093
/// <param name="LinkID">The ID of the account linking process which was returned when starting the linking process</param>
10961094
/// <param name="onComplete">onComplete Action for handling the response of type LootLockerAccountLinkProcessStatusResponse</param>
1097-
public static void CheckStatusOfAccountLinkingProcess(string LinkID, Action<LootLockerAccountLinkProcessStatusResponse> onComplete)
1095+
public static void CheckAccountLinkingProcessStatus(string LinkID, Action<LootLockerAccountLinkProcessStatusResponse> onComplete)
10981096
{
10991097
if (!CheckInitialized())
11001098
{
11011099
onComplete?.Invoke(LootLockerResponseFactory.SDKNotInitializedError<LootLockerAccountLinkProcessStatusResponse>());
11021100
return;
11031101
}
11041102

1105-
var endpoint = LootLockerEndPoints.CheckStatusOfAccountLinkingProcess;
1103+
var endpoint = LootLockerEndPoints.CheckAccountLinkingProcessStatus;
11061104

11071105
LootLockerServerRequest.CallAPI(string.Format(endpoint.endPoint, LinkID), endpoint.httpMethod, onComplete: (serverResponse) => { LootLockerResponse.Deserialize(onComplete, serverResponse); });
11081106
}
@@ -1149,6 +1147,8 @@ public static void UnlinkProviderFromAccount(Platforms Provider, Action<LootLock
11491147

11501148
#endregion
11511149

1150+
#endif
1151+
11521152
#region Player
11531153
/// <summary>
11541154
/// Get general information about the current current player, such as the XP, Level information and their account balance.

Runtime/Game/Requests/AccountLinkRequest.cs

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
1-
using LootLocker.LootLockerEnums;
2-
using LootLocker.Requests;
3-
using System;
4-
using System.Collections.Generic;
5-
using static UnityEngine.UI.CanvasScaler;
1+
using LootLocker.LootLockerEnums;
62

73
namespace LootLocker.LootLockerEnums
84
{
@@ -12,13 +8,12 @@ namespace LootLocker.LootLockerEnums
128
public enum LootLockerAccountLinkingProcessStatus
139
{
1410
Undefined = 0,
15-
Started = 1,
16-
Cancelled = 2,
17-
Completed = 3
11+
Started = 1,
12+
Cancelled = 2,
13+
Completed = 3
1814
};
1915
}
2016

21-
2217
namespace LootLocker.Requests
2318
{
2419
//==================================================
@@ -57,7 +52,7 @@ public class LootLockerAccountLinkProcessStatusResponse : LootLockerResponse
5752
* Current status of the specified account linking process
5853
*/
5954

60-
LootLockerAccountLinkingProcessStatus Status = LootLockerAccountLinkingProcessStatus.Undefined;
55+
LootLockerAccountLinkingProcessStatus Status;
6156
/*
6257
* Time when the specified account linking process was started
6358
*/

0 commit comments

Comments
 (0)