Fetch Metadata In-Game by Tags
Last updated
Was this helpful?
Last updated
Was this helpful?
Was this helpful?
// Available sources are: reward, leaderboard, catalog_item, progression, currency,
LootLockerMetadataSources sourceType = LootLockerMetadataSources.progression;
// The ulid of the source you are trying to fetch metadata for
string sourceID = "01J96M0BX1GGTPP2QDRCBV3FW2";
// The tags of the metadata that you want to fetch
string[] tags = {"warrior", "global" };
// Base64 can be set to content_type 'application/x-redacted', use this to avoid accidentally fetching large data files
bool ignoreFiles = true;
LootLockerSDKManager.ListMetadataWithTags(sourceType, sourceID, tags, (response) =>
{
if (response.success)
{
// If it succeeded, display all fetched metadata in the console
Debug.Log("Metadata result:");
foreach (var entry in response.entries)
{
string value = "";
Debug.Log(entry.key+": "+entry.TryGetValueAsString(out value));
}
}
else
{
// If it failed, output the error to the console
Debug.Log(response.errorData.message);
}
}, ignoreFiles);curl -X GET 'https://api.lootlocker.io/game/metadata/source/catalog_item/id/{ulid}?tags={tags}&ignore_files={bool}' \
-H 'x-session-token: your_token_here' \