diff options
author | lonkaars <l.leblansch@gmail.com> | 2021-03-10 14:37:12 +0100 |
---|---|---|
committer | lonkaars <l.leblansch@gmail.com> | 2021-03-10 14:37:12 +0100 |
commit | 1b8e3e479fb1fcea333571aaa3dd090ec78e346b (patch) | |
tree | 81e56c707a284f4e535ce947196dd0e8794924c0 /api/api.ts | |
parent | ba0e25a47082ada94565da07b2451ff00d0e2857 (diff) |
/user page use /user/games api
Diffstat (limited to 'api/api.ts')
-rw-r--r-- | api/api.ts | 27 |
1 files changed, 27 insertions, 0 deletions
@@ -31,3 +31,30 @@ export interface userPreferences { userColors?: userColors; } +export interface userGameTotals { + draw: number; + games: number; + lose: number; + win: number; +} + +export interface userGames { + totals: userGameTotals; + games: Array<gameInfo>; +} + +export interface gameInfo { + created: number; + duration: number; + id: string; + moves: Array<number>; + opponent: string; + outcome: "w"|"l"|"d"; + parent?: string; + private: boolean; + rating?: number; + rating_opponent?: number; + ruleset: ruleset; + started: number; + status: "finished"|"in_progress"|"resign"|"wait_for_opponent"; +} |