Skip to content

Commit d473204

Browse files
committed
feature: Add support for listing player metadata
1 parent c08b691 commit d473204

16 files changed

+164
-24
lines changed

Runtime/Game/LootLockerSDKManager.cs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5801,7 +5801,7 @@ public static void GetEntitlement(string entitlementId, Action<LootLockerSingleE
58015801
/// </summary>
58025802
/// <param name="Source"> The source type for which to request metadata</param>
58035803
/// <param name="SourceID"> The specific source id for which to request metadata</param>
5804-
/// <param name="OnComplete">Delegate for handling the server response</param>
5804+
/// <param name="onComplete">Delegate for handling the server response</param>
58055805
/// <param name="IgnoreFiles"> Base64 values will be set to content_type "application/x-redacted" and the content will be an empty String. Use this to avoid accidentally fetching large data files.</param>
58065806
public static void ListMetadata(LootLockerMetadataSources Source, string SourceID, Action<LootLockerListMetadataResponse> onComplete, bool IgnoreFiles = false)
58075807
{
@@ -5815,7 +5815,7 @@ public static void ListMetadata(LootLockerMetadataSources Source, string SourceI
58155815
/// <param name="SourceID"> The specific source id for which to request metadata</param>
58165816
/// <param name="Page"> Used together with PerPage to apply pagination to this request. Page designates which "page" of items to fetch</param>
58175817
/// <param name="PerPage"> Used together with Page to apply pagination to this request.PerPage designates how many items are considered a "page"</param>
5818-
/// <param name="OnComplete">Delegate for handling the server response</param>
5818+
/// <param name="onComplete">Delegate for handling the server response</param>
58195819
/// <param name="IgnoreFiles"> Base64 values will be set to content_type "application/x-redacted" and the content will be an empty String. Use this to avoid accidentally fetching large data files.</param>
58205820
public static void ListMetadata(LootLockerMetadataSources Source, string SourceID, int Page, int PerPage, Action<LootLockerListMetadataResponse> onComplete, bool IgnoreFiles = false)
58215821
{
@@ -5828,7 +5828,7 @@ public static void ListMetadata(LootLockerMetadataSources Source, string SourceI
58285828
/// <param name="Source"> The source type for which to request metadata</param>
58295829
/// <param name="SourceID"> The specific source id for which to request metadata</param>
58305830
/// <param name="Tags"> The tags that the requested metadata should have, only metadata matching *all of* the given tags will be returned </param>
5831-
/// <param name="OnComplete">Delegate for handling the server response</param>
5831+
/// <param name="onComplete">Delegate for handling the server response</param>
58325832
/// <param name="IgnoreFiles"> Base64 values will be set to content_type "application/x-redacted" and the content will be an empty String. Use this to avoid accidentally fetching large data files.</param>
58335833
public static void ListMetadataWithTags(LootLockerMetadataSources Source, string SourceID, string[] Tags, Action<LootLockerListMetadataResponse> onComplete, bool IgnoreFiles = false)
58345834
{
@@ -5843,7 +5843,7 @@ public static void ListMetadataWithTags(LootLockerMetadataSources Source, string
58435843
/// <param name="Tags"> The tags that the requested metadata should have, only metadata matching *all of* the given tags will be returned </param>
58445844
/// <param name="Page"> Used together with PerPage to apply pagination to this request.Page designates which "page" of items to fetch</param>
58455845
/// <param name="PerPage"> Used together with Page to apply pagination to this request.PerPage designates how many items are considered a "page"</param>
5846-
/// <param name="OnComplete">Delegate for handling the server response</param>
5846+
/// <param name="onComplete">Delegate for handling the server response</param>
58475847
/// <param name="IgnoreFiles"> Base64 values will be set to content_type "application/x-redacted" and the content will be an empty String. Use this to avoid accidentally fetching large data files.</param>
58485848
public static void ListMetadataWithTags(LootLockerMetadataSources Source, string SourceID, string[] Tags, int Page, int PerPage, Action<LootLockerListMetadataResponse> onComplete, bool IgnoreFiles = false)
58495849
{
@@ -5862,7 +5862,7 @@ public static void ListMetadataWithTags(LootLockerMetadataSources Source, string
58625862
/// <param name="Source"> The source type for which to request metadata</param>
58635863
/// <param name="SourceID"> The specific source id for which to request metadata</param>
58645864
/// <param name="Key"> The key of the metadata to fetch, use this to fetch metadata for a specific key for the specified source.</param>
5865-
/// <param name="OnComplete">Delegate for handling the server response</param>
5865+
/// <param name="onComplete">Delegate for handling the server response</param>
58665866
/// <param name="IgnoreFiles"> Optional: Base64 values will be set to content_type "application/x-redacted" and the content will be an empty String. Use this to avoid accidentally fetching large data files.</param>
58675867
public static void GetMetadata(LootLockerMetadataSources Source, string SourceID, string Key, Action<LootLockerGetMetadataResponse> onComplete, bool IgnoreFiles=false)
58685868
{
@@ -5884,7 +5884,7 @@ public static void GetMetadata(LootLockerMetadataSources Source, string SourceID
58845884
/// List the requested page of Metadata for the specified source that has all of the provided tags and paginate according to the supplied pagination settings
58855885
/// </summary>
58865886
/// <param name="SourcesAndKeysToGet"> The combination of sources to get keys for, and the keys to get for those sources </param>
5887-
/// <param name="OnComplete">Delegate for handling the server response</param>
5887+
/// <param name="onComplete">Delegate for handling the server response</param>
58885888
/// <param name="IgnoreFiles"> Optional: Base64 values will be set to content_type "application/x-redacted" and the content will be an empty String. Use this to avoid accidentally fetching large data files.</param>
58895889
public static void GetMultisourceMetadata(LootLockerMetadataSourceAndKeys[] SourcesAndKeysToGet, Action<LootLockerGetMultisourceMetadataResponse> onComplete, bool ignoreFiles = false)
58905890
{
@@ -5903,7 +5903,7 @@ public static void GetMultisourceMetadata(LootLockerMetadataSourceAndKeys[] Sour
59035903
/// <summary>
59045904
/// List notifications without filters and with default pagination settings
59055905
/// </summary>
5906-
/// <param name="OnComplete">Delegate for handling the server response</param>
5906+
/// <param name="onComplete">Delegate for handling the server response</param>
59075907
public static void ListNotificationsWithDefaultParameters(Action<LootLockerListNotificationsResponse> onComplete)
59085908
{
59095909
if (!CheckInitialized())
@@ -5942,7 +5942,7 @@ public static void ListNotificationsWithDefaultParameters(Action<LootLockerListN
59425942
/// <param name="PerPage">(Optional) Used together with Page to apply pagination to this request. PerPage designates how many notifications are considered a "page". Set to 0 to not use this filter.</param>
59435943
/// <param name="Page">(Optional) Used together with PerPage to apply pagination to this request. Page designates which "page" of items to fetch. Set to 0 to not use this filter.</param>
59445944
/// <param name="onComplete"></param>
5945-
/// <param name="OnComplete">Delegate for handling the server response</param>
5945+
/// <param name="onComplete">Delegate for handling the server response</param>
59465946
public static void ListNotifications(bool ShowRead, LootLockerNotificationPriority? WithPriority, string OfType, string WithSource, int PerPage, int Page, Action<LootLockerListNotificationsResponse> onComplete)
59475947
{
59485948
if (!CheckInitialized())
@@ -5982,7 +5982,7 @@ public static void ListNotifications(bool ShowRead, LootLockerNotificationPriori
59825982
///
59835983
/// Warning: This will mark ALL unread notifications as read, so if you have listed notifications but due to filters and/or pagination not pulled all of them you may have unviewed unread notifications
59845984
/// </summary>
5985-
/// <param name="OnComplete">Delegate for handling the server response</param>
5985+
/// <param name="onComplete">Delegate for handling the server response</param>
59865986
public static void MarkAllNotificationsAsRead(Action<LootLockerReadNotificationsResponse> onComplete)
59875987
{
59885988
if (!CheckInitialized())
@@ -5998,7 +5998,7 @@ public static void MarkAllNotificationsAsRead(Action<LootLockerReadNotifications
59985998
/// Mark the specified notifications as read
59995999
/// </summary>
60006000
/// <param name="NotificationIds">List of ids of notifications to mark as read</param>
6001-
/// <param name="OnComplete">Delegate for handling the server response</param>
6001+
/// <param name="onComplete">Delegate for handling the server response</param>
60026002
public static void MarkNotificationsAsRead(string[] NotificationIds, Action<LootLockerReadNotificationsResponse> onComplete)
60036003
{
60046004
if (!CheckInitialized())

Runtime/Game/Requests/EntitlementRequests.cs.meta

Lines changed: 10 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Runtime/Game/Requests/MetadataRequests.cs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ public enum LootLockerMetadataSources
2323
catalog_item = 2,
2424
progression = 3,
2525
currency = 4,
26+
player = 5,
27+
self = 6
2628
};
2729

2830
/// <summary>
@@ -291,6 +293,10 @@ public partial class LootLockerAPIManager
291293
{
292294
public static void ListMetadata(LootLockerMetadataSources Source, string SourceID, int Page, int PerPage, string Key, string[] Tags, bool ignoreFiles, Action<LootLockerListMetadataResponse> onComplete)
293295
{
296+
if (Source == LootLockerMetadataSources.self)
297+
{
298+
SourceID = "self";
299+
}
294300
string formattedEndpoint = string.Format(LootLockerEndPoints.listMetadata.endPoint, Source.ToString(), SourceID);
295301

296302
string queryParams = "";
@@ -335,6 +341,14 @@ public static void GetMultisourceMetadata(LootLockerMetadataSourceAndKeys[] Sour
335341
endpoint += queryParams;
336342
}
337343

344+
foreach ( var sourcePair in SourcesAndKeysToGet)
345+
{
346+
if(sourcePair.source == LootLockerMetadataSources.self)
347+
{
348+
sourcePair.id = "self";
349+
}
350+
}
351+
338352
LootLockerGetMultisourceMetadataRequest request = new LootLockerGetMultisourceMetadataRequest { sources = SourcesAndKeysToGet };
339353

340354
string json = LootLockerJson.SerializeObject(request);

Runtime/Game/Requests/NotificationRequests.cs.meta

Lines changed: 10 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Runtime/Game/Requests/TriggersRequests.cs.meta

Lines changed: 10 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Tests/LootLockerTestUtils/LootLockerTestConfigurationApiKey.cs.meta

Lines changed: 10 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Tests/LootLockerTestUtils/LootLockerTestConfigurationAuth.cs.meta

Lines changed: 10 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Tests/LootLockerTestUtils/LootLockerTestConfigurationEndpoints.cs.meta

Lines changed: 10 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Tests/LootLockerTestUtils/LootLockerTestConfigurationGame.cs.meta

Lines changed: 10 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Tests/LootLockerTestUtils/LootLockerTestConfigurationPlatform.cs.meta

Lines changed: 10 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)