Skip to content

API: Add endpoint which returns the current match (sendouq OR tournament) of a user #2693

@strohitv

Description

@strohitv

I wanna craft a little overlay for myself which I can use to show my current match on stream.
SendouQ is possible but there's currently no real way to get the current tournament match of a player.

Could you add an endpoint GET /api/user/{userId}/active-match which lists either the id of the current sendouq or tournament match?

The response could be similar to the GET /api/sendouq/active-match/{userId} endpoint just with a flag added to distinguish between sendouq and tournament:

export interface GetUsersActiveMatchResponse {
    /** The user's current match ID or null if none */
    matchId: number | null;
    /** a flag which tells what kind of match the user is in right now */
    lobby: "sendouq" | "tournament" | null;

    // alternative option instead of lobby, dunno which one would be better.
    // Would be null for sendouq or no match and the id of the tournament for tournaments
    tournamentId: number | null;
}

I think both lobby and tournamentId as fields would have their upsides, so maybe adding both would be beneficial if it doesn't come with too high cost.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions