Library referenceClasses
AppPlayerApi
the signed-in player and the lookup that turns a name into a subject id; scope profile, which every token has
Constructors
Constructor
new AppPlayerApi(gapi, auth): AppPlayerApi;Parameters
| Parameter | Type |
|---|---|
gapi | KrunkerClient |
auth | Record<string, string> |
Returns
AppPlayerApi
Methods
byName()
byName(name): Promise<AppPlayer>;GET /app/v1/players/by-name/:name (profile), any player by name; a banned or hidden account is a 404
Parameters
| Parameter | Type |
|---|---|
name | string |
Returns
Promise<AppPlayer>
me()
me(): Promise<AppMe>;GET /app/v1/me (profile), the signed-in player and the scopes this token can use right now; also the userinfo endpoint
Returns
Promise<AppMe>