For supported games, level unlocks are now available using the game meta endpoint. For an example, check out the BedWars Game Meta endpoint.
The endpoint has been updated to include two arrays:
levelUnlocks contains an ordered array, level to unlock array, containing both game-specific and global unlocks for each level. For game-specific unlocks, this looks like:
{
"name": "Creeper",
"icon": "https://cdn.playhive.com/icons/locker/sky/flag/creeper.png",
"type": "Player Flag",
"global": false
}
Please note icon MAY be null. Global is false for all game-specific unlocks.
For global unlocks, global is true, and an additional field globalCosmetic provides the entire meta for the global unlock, such as:
{
"name": "Boom boom boom",
"icon": "https://cdn.playhive.com/avatars/sky-boom-boom-boom.png",
"type": "Avatar",
"global": true,
"globalCosmetic": {
"url": "https://cdn.playhive.com/avatars/sky-boom-boom-boom.png",
"name": "Boom boom boom",
"type": "avatar"
}
}
Please note icon MAY be null.
The other new array, levelUnlockTypes, contains the game-specific types you will encounter in the levelUnlocks array. It provides the default unlock, or null if there is no default. It also provides the category icon.
As this update only provides new data, this is not behind a version/feature flag. Hub title meta is always the expanded meta, but unresolved as the display is not specific to a player.