Interface GameStatsSource
- All Known Implementing Classes:
StaticGameStatsSource
public interface GameStatsSource
Host hook that fetches an account's public stats on one server. The library never holds an API key or
knows any server's endpoint or stat format: the host implements this (reads its key, calls the
server's API, formats the result into
GameStats display chips). Register one source per server
on AltsRuntime.Builder; the runtime caches per server, keyed by player UUID.
Game stats are an optional capability. A host may register no sources, and a registered source may
return null (or throw) to signal "no stats for this player". Called off the main thread by an
AsyncCache; may block on I/O.
- Since:
- 0.3.0
-
Method Summary
-
Method Details
-
serverId
String serverId()Returns the identifier of the server this source covers. Used as the cache key and theGameStats.serverId()stamp, and looked up byAltsRuntime.gameStats(String).- Returns:
- the server id (stable, non-null)
- Since:
- 0.3.0
-
fetch
-