Triangle.js Docs
    Preparing search index...

    Interface Record

    Achieved scores and matches are saved into Record objects. While these may change in structure drastically, the most important parts of their structure is outlined below:

    interface Record {
        _id: string;
        disputed: boolean;
        extras:
            | {}
            | {
                league: {
                    [userid: string]: [
                        {
                            glicko: number;
                            placement: number;
                            rank: Rank;
                            rd: number;
                            tr: number;
                        },
                        {
                            glicko: number;
                            placement: number;
                            rank: Rank;
                            rd: number;
                            tr: number;
                        },
                    ];
                };
                result: "victory"
                | "defeat"
                | "dqvictory"
                | "dqdefeat"
                | "nocontest";
            };
        gamemode: string;
        leaderboards: string[];
        oncepb: boolean;
        otherusers: {
            avatar_revision: number;
            banner_revision: number;
            country: string;
            id: string;
            supporter: boolean;
            username: string;
        }[];
        pb: boolean;
        replayid: string;
        results: any;
        revolution?: string;
        stub: boolean;
        ts: string;
        user: {
            avatar_revision?: number;
            banner_revision?: number;
            country?: string;
            id: string;
            supporter: boolean;
            username: string;
        };
    }
    Index

    Properties

    _id: string

    The Record's ID.

    disputed: boolean

    Whether this Record is disputed.

    extras:
        | {}
        | {
            league: {
                [userid: string]: [
                    {
                        glicko: number;
                        placement: number;
                        rank: Rank;
                        rd: number;
                        tr: number;
                    },
                    {
                        glicko: number;
                        placement: number;
                        rank: Rank;
                        rd: number;
                        tr: number;
                    },
                ];
            };
            result: "victory"
            | "defeat"
            | "dqvictory"
            | "dqdefeat"
            | "nocontest";
        }

    Extra metadata for this Record:

    gamemode: string

    The played game mode.

    leaderboards: string[]

    The leaderboards this Record is mentioned in.

    oncepb: boolean

    Whether this was once the user's personal best in the game mode.

    otherusers: {
        avatar_revision: number;
        banner_revision: number;
        country: string;
        id: string;
        supporter: boolean;
        username: string;
    }[]

    Other users mentioned in the Record. Same format as user. If not empty, this is a multiplayer game (this changes the format of results)

    pb: boolean

    Whether this is the user's current personal best in the game mode.

    replayid: string

    The Record's ReplayID.

    results: any

    The results of this Record:

    revolution?: string

    If revolved away, the revolution it belongs to.

    stub: boolean

    Whether the Replay has been pruned.

    ts: string

    The time the Record was submitted.

    user: {
        avatar_revision?: number;
        banner_revision?: number;
        country?: string;
        id: string;
        supporter: boolean;
        username: string;
    }

    The user owning the Record:

    Type Declaration

    • Optionalavatar_revision?: number

      The user's avatar revision (for obtaining avatar URLs).

    • Optionalbanner_revision?: number

      The user's banner revision (for obtaining banner URLs).

    • Optionalcountry?: string

      The user's country, if public.

    • id: string

      The user's user ID.

    • supporter: boolean

      Whether the user is supporting TETR.IO.

    • username: string

      The user's username.