C++ SDK — Game Data

Game Data

getGameData
template<typename T = nlohmann::json>
static GameDataResponse<T> getGameData(Client& client)

Retrieves global game data with nlohmann::json compatible nested objects.

updateGameData
template<typename T>
static SuccessResponse updateGameData(Client& client, const T& data)

Updates global game data (requires private API token). Uses template type for type safety.

getPlayerData
template<typename T = nlohmann::json>
static PlayerDataResponse<T> getPlayerData(
    Client& client,
    const std::string& playerToken
)

Retrieves a specific player's data using their authentication token with typed support.

updatePlayerData
template<typename T>
static SuccessResponse updatePlayerData(
    Client& client,
    const std::string& playerToken,
    const T& data
)

Updates a specific player's data like level, score, and inventory with template type support.