Fetch a Single Metadata In-Game
In this How-to, we will fetch a single metadata entry from a leaderboard and output it to the console.
Prerequisites
A LootLocker account and a created game
Fetching Metadata
When fetching a single metadata, you need to provide 3 things:
A
ulid
: (can be retrieved through the web console or in the SDK's depending on the feature) of the item to fetch metadata forFor example:
01J96M0BX1GGTPP2QDRCBV3FW2
A key: of the desired metadata
For example:
icon
A source type
One of the following: Progression, leaderboard, catalog_item, currency
Fetching the metadata
When fetching the metadata by key, you simply call the function and display or handle the data.
Check out our SDK for more ways of handling the received metadata entries.
Conclusion
In this How-to we’ve fetched a single metadata entry that was created in the web console. Apart from getting just one single data entry with metadata, you also have the possibility to Fetch metadata in game by tags or fetch metadata in game from multiple sources.
Last updated