Skip to content

Commit b1e279d

Browse files
Mikkel Sørensenkirre-bylund
authored andcommitted
Made the naming more true to its purpose
It was called "GetEntitlementHistory" however, it has nothing to do with the history, rather a current state of one
1 parent 3d710c7 commit b1e279d

File tree

3 files changed

+12
-7
lines changed

3 files changed

+12
-7
lines changed

Runtime/Client/LootLockerEndPoints.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ public class LootLockerEndPoints
284284
// Entitlements
285285
[Header("Entitlements")]
286286
public static EndPointClass listEntitlementHistory = new EndPointClass("entitlements", LootLockerHTTPMethod.GET);
287-
public static EndPointClass getSingleEntitlementHistory = new EndPointClass("entitlements/{0}", LootLockerHTTPMethod.GET);
287+
public static EndPointClass getSingleEntitlement = new EndPointClass("entitlements/{0}", LootLockerHTTPMethod.GET);
288288

289289
}
290290
}

Runtime/Game/LootLockerSDKManager.cs

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5617,16 +5617,21 @@ public static void ListEntitlements(Action<LootLockerEntitlementHistoryResponse>
56175617
ListEntitlements(-1, null, onComplete);
56185618
}
56195619

5620-
public static void GetSingleEntitlementHistory(string entitlementId, Action<LootLockerSingleEntitlementHistoryResponse> onComplete)
5620+
/// <summary>
5621+
/// Get a single entitlement
5622+
/// </summary>
5623+
/// <param name="entitlementId"></param>
5624+
/// <param name="onComplete"></param>
5625+
public static void GetSingleEntitlement(string entitlementId, Action<LootLockerSingleEntitlementResponse> onComplete)
56215626
{
56225627
if (!CheckInitialized())
56235628
{
5624-
onComplete?.Invoke(LootLockerResponseFactory.SDKNotInitializedError<LootLockerSingleEntitlementHistoryResponse>());
5629+
onComplete?.Invoke(LootLockerResponseFactory.SDKNotInitializedError<LootLockerSingleEntitlementResponse>());
56255630
return;
56265631
}
56275632

5628-
var endpoint = string.Format(LootLockerEndPoints.getSingleEntitlementHistory.endPoint, entitlementId);
5629-
LootLockerServerRequest.CallAPI(endpoint, LootLockerEndPoints.getSingleEntitlementHistory.httpMethod, onComplete: (serverResponse) => { LootLockerResponse.Deserialize(onComplete, serverResponse); });
5633+
var endpoint = string.Format(LootLockerEndPoints.getSingleEntitlement.endPoint, entitlementId);
5634+
LootLockerServerRequest.CallAPI(endpoint, LootLockerEndPoints.getSingleEntitlement.httpMethod, onComplete: (serverResponse) => { LootLockerResponse.Deserialize(onComplete, serverResponse); });
56305635
}
56315636

56325637
#endregion

Runtime/Game/Requests/EntitlementRequests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,9 +188,9 @@ public class LootLockerEntitlementHistoryResponse : LootLockerResponse
188188
}
189189

190190
/// <summary>
191-
/// Response body of the entitlement history of a single entitlement id
191+
/// Response body of a single entitlement, which contains status and more information
192192
/// </summary>
193-
public class LootLockerSingleEntitlementHistoryResponse : LootLockerResponse
193+
public class LootLockerSingleEntitlementResponse : LootLockerResponse
194194
{
195195
/// <summary>
196196
/// When this entitlement listing was created

0 commit comments

Comments
 (0)