mp / MultiplayerClientnew MultiplayerClient(apiToken, options?)
Creates the client. apiToken is the public game token (safe in client code). Options: apiPrivateToken (admin — server-side only), baseUrl, timeout ms (default 30000), retries (GET retries, default 1), fetch (custom impl for tests).
mp.players · mp.rooms · mp.actions · mp.updates · mp.matchmaking · mp.matchmakingRequests · mp.leaderboard · mp.friends · mp.games · mp.moderation · mp.time · mp.realtime
One facade per API family — same coverage as the other SDKs. mp.createRealtime(options) builds the realtime client.
await mp.send(method, url, body?, { playerToken?, usePrivateToken? })
Low-level request primitive used by every facade. Credentials go in headers only. API failures are returned ({success:false,error}), not thrown — transport failures throw TransportError.
mp.url(endpoint, query?)
Builds an API URL; skips undefined query values. Credentials are never placed in the URL.
MultiplayerError · TransportError · ConfigurationError · RealtimeError
TransportError carries .url/.cause (timeout, DNS, non-JSON). ConfigurationError = misuse (missing tokens, admin call without private token, UDP in a browser). RealtimeError = socket-level failure with .code/.reason.