openapi: 3.0.3
info:
  title: Rimble Raw Data API
  version: "1.0.0"
  description: |
    Raw data API for esports match data across **League of Legends, CS:GO, DOTA 2, Valorant,
    Rocket League, Call of Duty, NBA2K, FIFA, Siege,** and **Cricket**.

    We provide upcoming matches as well as live and post-game information for world-wide
    professional leagues, along with other useful metadata and final game states — all with
    extremely low latency and high accuracy.

    ## Overview

    Our API only supports `GET` requests, and **all requests must end with a trailing slash** `/`.

    ## Authentication

    All endpoints require API key authentication via the `x-api-key` header.
    Reach out to us to get your access key.

    ## Querying

    You may query for specific games using query parameters. For example, to query by `matchid`,
    add `?matchid={matchid}` after the trailing slash. To query with multiple parameters, use
    `?date={YYYY-MM-DD}&team={team name}`. Spaces are permitted in team and league name queries.

    We highly recommend using query parameters rather than calling the base endpoint, to keep
    response sizes manageable.

    ## Data Updates

    All data feeds are updated hourly, 10 minutes past the hour. We recommend pulling data at
    the same frequency — the best time is at the stroke of the hour or 30 minutes past.

    ## Terminology

    A **match** describes the event where two teams play each other, often as a "best of"-style
    series. Each match may comprise multiple **games**, and results are provided per match.
  contact:
    email: support@rimble.io
  license:
    name: Proprietary

servers:
  - url: https://rimbleanalytics.com
    description: Production

security:
  - apiKeyAuth: []

tags:
  - name: lol
    description: League of Legends
  - name: csgo
    description: "CS:GO"
  - name: dota2
    description: DOTA 2
  - name: valorant
    description: Valorant
  - name: rocketleague
    description: Rocket League
  - name: cod
    description: Call of Duty
  - name: nba2k
    description: NBA2K
  - name: fifa
    description: FIFA
  - name: siege
    description: Siege
  - name: cricket
    description: Cricket

paths:
  # ---------------------------------------------------------------------------
  # League of Legends
  # ---------------------------------------------------------------------------
  /raw/lol/upcoming-matches/:
    get:
      tags: [lol]
      operationId: getLolUpcomingMatches
      summary: Get upcoming League of Legends matches
      parameters:
        - $ref: "#/components/parameters/date"
        - $ref: "#/components/parameters/matchid"
        - $ref: "#/components/parameters/time"
        - $ref: "#/components/parameters/team"
        - $ref: "#/components/parameters/league"
      responses:
        "200":
          description: A JSON array of upcoming match objects.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/UpcomingMatch"

  /raw/lol/live-matches/:
    get:
      tags: [lol]
      operationId: getLolLiveMatches
      summary: Get live League of Legends matches
      description: |
        Returns matches that are currently live. The response format is the same as
        upcoming matches. This endpoint tracks which matches have gone live rather than
        providing real-time in-game data.
      parameters:
        - $ref: "#/components/parameters/date"
        - $ref: "#/components/parameters/matchid"
        - $ref: "#/components/parameters/time"
        - $ref: "#/components/parameters/team"
        - $ref: "#/components/parameters/league"
      responses:
        "200":
          description: A JSON array of live match objects.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/UpcomingMatch"

  /raw/lol/completed-matches/:
    get:
      tags: [lol]
      operationId: getLolCompletedMatches
      summary: Get completed League of Legends matches
      description: |
        Returns completed matches for the last 5 days. Contact us for access to older matches.
      parameters:
        - $ref: "#/components/parameters/date"
        - $ref: "#/components/parameters/matchid"
        - $ref: "#/components/parameters/time"
        - $ref: "#/components/parameters/team"
        - $ref: "#/components/parameters/league"
      responses:
        "200":
          description: A JSON array of completed match objects.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/CompletedMatch"

  /raw/lol/match-status/:
    get:
      tags: [lol]
      operationId: getLolMatchStatus
      summary: Get status of a League of Legends match
      parameters:
        - $ref: "#/components/parameters/matchidRequired"
        - $ref: "#/components/parameters/dateForOlderMatch"
      responses:
        "200":
          description: A JSON array containing a single match object with a match_status field.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/MatchStatusResponse"

  /raw/lol/league-mappings/:
    get:
      tags: [lol]
      operationId: getLolLeagueMappings
      summary: Get League of Legends league/tournament mappings
      parameters:
        - $ref: "#/components/parameters/league_id"
        - $ref: "#/components/parameters/name"
        - $ref: "#/components/parameters/min_prize_money"
      responses:
        "200":
          description: A JSON array of league mapping objects.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/LeagueMapping"

  /raw/lol/teams/:
    get:
      tags: [lol]
      operationId: getLolTeams
      summary: Get League of Legends teams
      parameters:
        - $ref: "#/components/parameters/id"
      responses:
        "200":
          description: A JSON array of team objects.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/TeamInfo"

  /raw/lol/players/:
    get:
      tags: [lol]
      operationId: getLolPlayers
      summary: Get League of Legends players
      parameters:
        - $ref: "#/components/parameters/id"
      responses:
        "200":
          description: A JSON array of player objects.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/PlayerInfo"

  # ---------------------------------------------------------------------------
  # CS:GO
  # ---------------------------------------------------------------------------
  /raw/csgo/upcoming-matches/:
    get:
      tags: [csgo]
      operationId: getCsgoUpcomingMatches
      summary: Get upcoming CS:GO matches
      parameters:
        - $ref: "#/components/parameters/date"
        - $ref: "#/components/parameters/matchid"
        - $ref: "#/components/parameters/time"
        - $ref: "#/components/parameters/team"
        - $ref: "#/components/parameters/league"
      responses:
        "200":
          description: A JSON array of upcoming match objects.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/UpcomingMatch"

  /raw/csgo/live-matches/:
    get:
      tags: [csgo]
      operationId: getCsgoLiveMatches
      summary: Get live CS:GO matches
      description: |
        Returns matches that are currently live. The response format is the same as
        upcoming matches.
      parameters:
        - $ref: "#/components/parameters/date"
        - $ref: "#/components/parameters/matchid"
        - $ref: "#/components/parameters/time"
        - $ref: "#/components/parameters/team"
        - $ref: "#/components/parameters/league"
      responses:
        "200":
          description: A JSON array of live match objects.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/UpcomingMatch"

  /raw/csgo/completed-matches/:
    get:
      tags: [csgo]
      operationId: getCsgoCompletedMatches
      summary: Get completed CS:GO matches
      description: |
        Returns completed matches for the last 5 days. Contact us for access to older matches.
      parameters:
        - $ref: "#/components/parameters/date"
        - $ref: "#/components/parameters/matchid"
        - $ref: "#/components/parameters/time"
        - $ref: "#/components/parameters/team"
        - $ref: "#/components/parameters/league"
      responses:
        "200":
          description: A JSON array of completed match objects.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/CompletedMatch"

  /raw/csgo/match-status/:
    get:
      tags: [csgo]
      operationId: getCsgoMatchStatus
      summary: Get status of a CS:GO match
      parameters:
        - $ref: "#/components/parameters/matchidRequired"
        - $ref: "#/components/parameters/dateForOlderMatch"
      responses:
        "200":
          description: A JSON array containing a single match object with a match_status field.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/MatchStatusResponse"

  /raw/csgo/league-mappings/:
    get:
      tags: [csgo]
      operationId: getCsgoLeagueMappings
      summary: Get CS:GO league/tournament mappings
      parameters:
        - $ref: "#/components/parameters/league_id"
        - $ref: "#/components/parameters/name"
        - $ref: "#/components/parameters/min_prize_money"
      responses:
        "200":
          description: A JSON array of league mapping objects.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/LeagueMapping"

  /raw/csgo/teams/:
    get:
      tags: [csgo]
      operationId: getCsgoTeams
      summary: Get CS:GO teams
      parameters:
        - $ref: "#/components/parameters/id"
      responses:
        "200":
          description: A JSON array of team objects.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/TeamInfo"

  /raw/csgo/players/:
    get:
      tags: [csgo]
      operationId: getCsgoPlayers
      summary: Get CS:GO players
      parameters:
        - $ref: "#/components/parameters/id"
      responses:
        "200":
          description: A JSON array of player objects.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/PlayerInfo"

  # ---------------------------------------------------------------------------
  # DOTA 2
  # ---------------------------------------------------------------------------
  /raw/dota2/upcoming-matches/:
    get:
      tags: [dota2]
      operationId: getDota2UpcomingMatches
      summary: Get upcoming DOTA 2 matches
      description: |
        Note: For DOTA 2, league_details.id, teams.id, and player.id are integers
        rather than strings.
      parameters:
        - $ref: "#/components/parameters/date"
        - $ref: "#/components/parameters/matchid"
        - $ref: "#/components/parameters/time"
        - $ref: "#/components/parameters/team"
        - $ref: "#/components/parameters/league"
      responses:
        "200":
          description: A JSON array of upcoming match objects.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/UpcomingMatch"

  /raw/dota2/live-matches/:
    get:
      tags: [dota2]
      operationId: getDota2LiveMatches
      summary: Get live DOTA 2 matches
      description: |
        Returns matches that are currently live. The response format is the same as
        upcoming matches.
      parameters:
        - $ref: "#/components/parameters/date"
        - $ref: "#/components/parameters/matchid"
        - $ref: "#/components/parameters/time"
        - $ref: "#/components/parameters/team"
        - $ref: "#/components/parameters/league"
      responses:
        "200":
          description: A JSON array of live match objects.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/UpcomingMatch"

  /raw/dota2/completed-matches/:
    get:
      tags: [dota2]
      operationId: getDota2CompletedMatches
      summary: Get completed DOTA 2 matches
      description: |
        Returns completed matches for the last 5 days. Contact us for access to older matches.
        Note: For DOTA 2, league_details.id, teams.id, and player.id are integers.
      parameters:
        - $ref: "#/components/parameters/date"
        - $ref: "#/components/parameters/matchid"
        - $ref: "#/components/parameters/time"
        - $ref: "#/components/parameters/team"
        - $ref: "#/components/parameters/league"
      responses:
        "200":
          description: A JSON array of completed match objects.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/CompletedMatch"

  /raw/dota2/match-status/:
    get:
      tags: [dota2]
      operationId: getDota2MatchStatus
      summary: Get status of a DOTA 2 match
      parameters:
        - $ref: "#/components/parameters/matchidRequired"
        - $ref: "#/components/parameters/dateForOlderMatch"
      responses:
        "200":
          description: A JSON array containing a single match object with a match_status field.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/MatchStatusResponse"

  /raw/dota2/league-mappings/:
    get:
      tags: [dota2]
      operationId: getDota2LeagueMappings
      summary: Get DOTA 2 league/tournament mappings
      parameters:
        - $ref: "#/components/parameters/league_id"
        - $ref: "#/components/parameters/name"
        - $ref: "#/components/parameters/min_prize_money"
      responses:
        "200":
          description: A JSON array of league mapping objects.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/LeagueMapping"

  /raw/dota2/teams/:
    get:
      tags: [dota2]
      operationId: getDota2Teams
      summary: Get DOTA 2 teams
      parameters:
        - $ref: "#/components/parameters/id"
      responses:
        "200":
          description: A JSON array of team objects.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/TeamInfo"

  /raw/dota2/players/:
    get:
      tags: [dota2]
      operationId: getDota2Players
      summary: Get DOTA 2 players
      parameters:
        - $ref: "#/components/parameters/id"
      responses:
        "200":
          description: A JSON array of player objects.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/PlayerInfo"

  # ---------------------------------------------------------------------------
  # Valorant
  # ---------------------------------------------------------------------------
  /raw/valorant/upcoming-matches/:
    get:
      tags: [valorant]
      operationId: getValorantUpcomingMatches
      summary: Get upcoming Valorant matches
      parameters:
        - $ref: "#/components/parameters/date"
        - $ref: "#/components/parameters/matchid"
        - $ref: "#/components/parameters/time"
        - $ref: "#/components/parameters/team"
        - $ref: "#/components/parameters/league"
      responses:
        "200":
          description: A JSON array of upcoming match objects.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/UpcomingMatch"

  /raw/valorant/live-matches/:
    get:
      tags: [valorant]
      operationId: getValorantLiveMatches
      summary: Get live Valorant matches
      description: |
        Returns matches that are currently live. The response format is the same as
        upcoming matches.
      parameters:
        - $ref: "#/components/parameters/date"
        - $ref: "#/components/parameters/matchid"
        - $ref: "#/components/parameters/time"
        - $ref: "#/components/parameters/team"
        - $ref: "#/components/parameters/league"
      responses:
        "200":
          description: A JSON array of live match objects.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/UpcomingMatch"

  /raw/valorant/completed-matches/:
    get:
      tags: [valorant]
      operationId: getValorantCompletedMatches
      summary: Get completed Valorant matches
      description: |
        Returns completed matches for the last 5 days. Contact us for access to older matches.
      parameters:
        - $ref: "#/components/parameters/date"
        - $ref: "#/components/parameters/matchid"
        - $ref: "#/components/parameters/time"
        - $ref: "#/components/parameters/team"
        - $ref: "#/components/parameters/league"
      responses:
        "200":
          description: A JSON array of completed match objects.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/CompletedMatch"

  /raw/valorant/match-status/:
    get:
      tags: [valorant]
      operationId: getValorantMatchStatus
      summary: Get status of a Valorant match
      parameters:
        - $ref: "#/components/parameters/matchidRequired"
        - $ref: "#/components/parameters/dateForOlderMatch"
      responses:
        "200":
          description: A JSON array containing a single match object with a match_status field.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/MatchStatusResponse"

  /raw/valorant/league-mappings/:
    get:
      tags: [valorant]
      operationId: getValorantLeagueMappings
      summary: Get Valorant league/tournament mappings
      parameters:
        - $ref: "#/components/parameters/league_id"
        - $ref: "#/components/parameters/name"
        - $ref: "#/components/parameters/min_prize_money"
      responses:
        "200":
          description: A JSON array of league mapping objects.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/LeagueMapping"

  /raw/valorant/teams/:
    get:
      tags: [valorant]
      operationId: getValorantTeams
      summary: Get Valorant teams
      parameters:
        - $ref: "#/components/parameters/id"
      responses:
        "200":
          description: A JSON array of team objects.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/TeamInfo"

  /raw/valorant/players/:
    get:
      tags: [valorant]
      operationId: getValorantPlayers
      summary: Get Valorant players
      parameters:
        - $ref: "#/components/parameters/id"
      responses:
        "200":
          description: A JSON array of player objects.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/PlayerInfo"

  # ---------------------------------------------------------------------------
  # Rocket League
  # ---------------------------------------------------------------------------
  /raw/rocketleague/upcoming-matches/:
    get:
      tags: [rocketleague]
      operationId: getRocketleagueUpcomingMatches
      summary: Get upcoming Rocket League matches
      parameters:
        - $ref: "#/components/parameters/date"
        - $ref: "#/components/parameters/matchid"
        - $ref: "#/components/parameters/time"
        - $ref: "#/components/parameters/team"
        - $ref: "#/components/parameters/league"
      responses:
        "200":
          description: A JSON array of upcoming match objects.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/UpcomingMatch"

  /raw/rocketleague/live-matches/:
    get:
      tags: [rocketleague]
      operationId: getRocketleagueLiveMatches
      summary: Get live Rocket League matches
      description: |
        Returns matches that are currently live. The response format is the same as
        upcoming matches.
      parameters:
        - $ref: "#/components/parameters/date"
        - $ref: "#/components/parameters/matchid"
        - $ref: "#/components/parameters/time"
        - $ref: "#/components/parameters/team"
        - $ref: "#/components/parameters/league"
      responses:
        "200":
          description: A JSON array of live match objects.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/UpcomingMatch"

  /raw/rocketleague/completed-matches/:
    get:
      tags: [rocketleague]
      operationId: getRocketleagueCompletedMatches
      summary: Get completed Rocket League matches
      description: |
        Returns completed matches for the last 5 days. Contact us for access to older matches.
      parameters:
        - $ref: "#/components/parameters/date"
        - $ref: "#/components/parameters/matchid"
        - $ref: "#/components/parameters/time"
        - $ref: "#/components/parameters/team"
        - $ref: "#/components/parameters/league"
      responses:
        "200":
          description: A JSON array of completed match objects.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/CompletedMatch"

  /raw/rocketleague/match-status/:
    get:
      tags: [rocketleague]
      operationId: getRocketleagueMatchStatus
      summary: Get status of a Rocket League match
      parameters:
        - $ref: "#/components/parameters/matchidRequired"
        - $ref: "#/components/parameters/dateForOlderMatch"
      responses:
        "200":
          description: A JSON array containing a single match object with a match_status field.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/MatchStatusResponse"

  /raw/rocketleague/league-mappings/:
    get:
      tags: [rocketleague]
      operationId: getRocketleagueLeagueMappings
      summary: Get Rocket League league/tournament mappings
      parameters:
        - $ref: "#/components/parameters/league_id"
        - $ref: "#/components/parameters/name"
        - $ref: "#/components/parameters/min_prize_money"
      responses:
        "200":
          description: A JSON array of league mapping objects.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/LeagueMapping"

  /raw/rocketleague/teams/:
    get:
      tags: [rocketleague]
      operationId: getRocketleagueTeams
      summary: Get Rocket League teams
      parameters:
        - $ref: "#/components/parameters/id"
      responses:
        "200":
          description: A JSON array of team objects.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/TeamInfo"

  /raw/rocketleague/players/:
    get:
      tags: [rocketleague]
      operationId: getRocketleaguePlayers
      summary: Get Rocket League players
      parameters:
        - $ref: "#/components/parameters/id"
      responses:
        "200":
          description: A JSON array of player objects.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/PlayerInfo"

  # ---------------------------------------------------------------------------
  # Call of Duty
  # ---------------------------------------------------------------------------
  /raw/cod/upcoming-matches/:
    get:
      tags: [cod]
      operationId: getCodUpcomingMatches
      summary: Get upcoming Call of Duty matches
      parameters:
        - $ref: "#/components/parameters/date"
        - $ref: "#/components/parameters/matchid"
        - $ref: "#/components/parameters/time"
        - $ref: "#/components/parameters/team"
        - $ref: "#/components/parameters/league"
      responses:
        "200":
          description: A JSON array of upcoming match objects.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/UpcomingMatch"

  /raw/cod/live-matches/:
    get:
      tags: [cod]
      operationId: getCodLiveMatches
      summary: Get live Call of Duty matches
      description: |
        Returns matches that are currently live. The response format is the same as
        upcoming matches.
      parameters:
        - $ref: "#/components/parameters/date"
        - $ref: "#/components/parameters/matchid"
        - $ref: "#/components/parameters/time"
        - $ref: "#/components/parameters/team"
        - $ref: "#/components/parameters/league"
      responses:
        "200":
          description: A JSON array of live match objects.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/UpcomingMatch"

  /raw/cod/completed-matches/:
    get:
      tags: [cod]
      operationId: getCodCompletedMatches
      summary: Get completed Call of Duty matches
      description: |
        Returns completed matches for the last 5 days. Contact us for access to older matches.
      parameters:
        - $ref: "#/components/parameters/date"
        - $ref: "#/components/parameters/matchid"
        - $ref: "#/components/parameters/time"
        - $ref: "#/components/parameters/team"
        - $ref: "#/components/parameters/league"
      responses:
        "200":
          description: A JSON array of completed match objects.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/CompletedMatch"

  /raw/cod/match-status/:
    get:
      tags: [cod]
      operationId: getCodMatchStatus
      summary: Get status of a Call of Duty match
      parameters:
        - $ref: "#/components/parameters/matchidRequired"
        - $ref: "#/components/parameters/dateForOlderMatch"
      responses:
        "200":
          description: A JSON array containing a single match object with a match_status field.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/MatchStatusResponse"

  /raw/cod/league-mappings/:
    get:
      tags: [cod]
      operationId: getCodLeagueMappings
      summary: Get Call of Duty league/tournament mappings
      parameters:
        - $ref: "#/components/parameters/league_id"
        - $ref: "#/components/parameters/name"
        - $ref: "#/components/parameters/min_prize_money"
      responses:
        "200":
          description: A JSON array of league mapping objects.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/LeagueMapping"

  /raw/cod/teams/:
    get:
      tags: [cod]
      operationId: getCodTeams
      summary: Get Call of Duty teams
      parameters:
        - $ref: "#/components/parameters/id"
      responses:
        "200":
          description: A JSON array of team objects.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/TeamInfo"

  /raw/cod/players/:
    get:
      tags: [cod]
      operationId: getCodPlayers
      summary: Get Call of Duty players
      parameters:
        - $ref: "#/components/parameters/id"
      responses:
        "200":
          description: A JSON array of player objects.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/PlayerInfo"

  # ---------------------------------------------------------------------------
  # NBA2K
  # ---------------------------------------------------------------------------
  /raw/nba2k/upcoming-matches/:
    get:
      tags: [nba2k]
      operationId: getNba2kUpcomingMatches
      summary: Get upcoming NBA2K matches
      parameters:
        - $ref: "#/components/parameters/date"
        - $ref: "#/components/parameters/matchid"
        - $ref: "#/components/parameters/time"
        - $ref: "#/components/parameters/team"
        - $ref: "#/components/parameters/league"
      responses:
        "200":
          description: A JSON array of upcoming match objects.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/UpcomingMatch"

  /raw/nba2k/live-matches/:
    get:
      tags: [nba2k]
      operationId: getNba2kLiveMatches
      summary: Get live NBA2K matches
      description: |
        Returns matches that are currently live. The response format is the same as
        upcoming matches.
      parameters:
        - $ref: "#/components/parameters/date"
        - $ref: "#/components/parameters/matchid"
        - $ref: "#/components/parameters/time"
        - $ref: "#/components/parameters/team"
        - $ref: "#/components/parameters/league"
      responses:
        "200":
          description: A JSON array of live match objects.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/UpcomingMatch"

  /raw/nba2k/completed-matches/:
    get:
      tags: [nba2k]
      operationId: getNba2kCompletedMatches
      summary: Get completed NBA2K matches
      description: |
        Returns completed matches for the last 5 days. Contact us for access to older matches.
      parameters:
        - $ref: "#/components/parameters/date"
        - $ref: "#/components/parameters/matchid"
        - $ref: "#/components/parameters/time"
        - $ref: "#/components/parameters/team"
        - $ref: "#/components/parameters/league"
      responses:
        "200":
          description: A JSON array of completed match objects.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/CompletedMatch"

  /raw/nba2k/match-status/:
    get:
      tags: [nba2k]
      operationId: getNba2kMatchStatus
      summary: Get status of an NBA2K match
      parameters:
        - $ref: "#/components/parameters/matchidRequired"
        - $ref: "#/components/parameters/dateForOlderMatch"
      responses:
        "200":
          description: A JSON array containing a single match object with a match_status field.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/MatchStatusResponse"

  /raw/nba2k/league-mappings/:
    get:
      tags: [nba2k]
      operationId: getNba2kLeagueMappings
      summary: Get NBA2K league/tournament mappings
      parameters:
        - $ref: "#/components/parameters/league_id"
        - $ref: "#/components/parameters/name"
        - $ref: "#/components/parameters/min_prize_money"
      responses:
        "200":
          description: A JSON array of league mapping objects.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/LeagueMapping"

  /raw/nba2k/teams/:
    get:
      tags: [nba2k]
      operationId: getNba2kTeams
      summary: Get NBA2K teams
      parameters:
        - $ref: "#/components/parameters/id"
      responses:
        "200":
          description: A JSON array of team objects.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/TeamInfo"

  /raw/nba2k/players/:
    get:
      tags: [nba2k]
      operationId: getNba2kPlayers
      summary: Get NBA2K players
      parameters:
        - $ref: "#/components/parameters/id"
      responses:
        "200":
          description: A JSON array of player objects.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/PlayerInfo"

  # ---------------------------------------------------------------------------
  # FIFA
  # ---------------------------------------------------------------------------
  /raw/fifa/upcoming-matches/:
    get:
      tags: [fifa]
      operationId: getFifaUpcomingMatches
      summary: Get upcoming FIFA matches
      parameters:
        - $ref: "#/components/parameters/date"
        - $ref: "#/components/parameters/matchid"
        - $ref: "#/components/parameters/time"
        - $ref: "#/components/parameters/team"
        - $ref: "#/components/parameters/league"
      responses:
        "200":
          description: A JSON array of upcoming match objects.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/UpcomingMatch"

  /raw/fifa/live-matches/:
    get:
      tags: [fifa]
      operationId: getFifaLiveMatches
      summary: Get live FIFA matches
      description: |
        Returns matches that are currently live. The response format is the same as
        upcoming matches.
      parameters:
        - $ref: "#/components/parameters/date"
        - $ref: "#/components/parameters/matchid"
        - $ref: "#/components/parameters/time"
        - $ref: "#/components/parameters/team"
        - $ref: "#/components/parameters/league"
      responses:
        "200":
          description: A JSON array of live match objects.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/UpcomingMatch"

  /raw/fifa/completed-matches/:
    get:
      tags: [fifa]
      operationId: getFifaCompletedMatches
      summary: Get completed FIFA matches
      description: |
        Returns completed matches for the last 5 days. Contact us for access to older matches.
      parameters:
        - $ref: "#/components/parameters/date"
        - $ref: "#/components/parameters/matchid"
        - $ref: "#/components/parameters/time"
        - $ref: "#/components/parameters/team"
        - $ref: "#/components/parameters/league"
      responses:
        "200":
          description: A JSON array of completed match objects.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/CompletedMatch"

  /raw/fifa/match-status/:
    get:
      tags: [fifa]
      operationId: getFifaMatchStatus
      summary: Get status of a FIFA match
      parameters:
        - $ref: "#/components/parameters/matchidRequired"
        - $ref: "#/components/parameters/dateForOlderMatch"
      responses:
        "200":
          description: A JSON array containing a single match object with a match_status field.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/MatchStatusResponse"

  /raw/fifa/league-mappings/:
    get:
      tags: [fifa]
      operationId: getFifaLeagueMappings
      summary: Get FIFA league/tournament mappings
      parameters:
        - $ref: "#/components/parameters/league_id"
        - $ref: "#/components/parameters/name"
        - $ref: "#/components/parameters/min_prize_money"
      responses:
        "200":
          description: A JSON array of league mapping objects.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/LeagueMapping"

  /raw/fifa/teams/:
    get:
      tags: [fifa]
      operationId: getFifaTeams
      summary: Get FIFA teams
      parameters:
        - $ref: "#/components/parameters/id"
      responses:
        "200":
          description: A JSON array of team objects.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/TeamInfo"

  /raw/fifa/players/:
    get:
      tags: [fifa]
      operationId: getFifaPlayers
      summary: Get FIFA players
      parameters:
        - $ref: "#/components/parameters/id"
      responses:
        "200":
          description: A JSON array of player objects.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/PlayerInfo"

  # ---------------------------------------------------------------------------
  # Siege
  # ---------------------------------------------------------------------------
  /raw/siege/upcoming-matches/:
    get:
      tags: [siege]
      operationId: getSiegeUpcomingMatches
      summary: Get upcoming Siege matches
      parameters:
        - $ref: "#/components/parameters/date"
        - $ref: "#/components/parameters/matchid"
        - $ref: "#/components/parameters/time"
        - $ref: "#/components/parameters/team"
        - $ref: "#/components/parameters/league"
      responses:
        "200":
          description: A JSON array of upcoming match objects.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/UpcomingMatch"

  /raw/siege/live-matches/:
    get:
      tags: [siege]
      operationId: getSiegeLiveMatches
      summary: Get live Siege matches
      description: |
        Returns matches that are currently live. The response format is the same as
        upcoming matches.
      parameters:
        - $ref: "#/components/parameters/date"
        - $ref: "#/components/parameters/matchid"
        - $ref: "#/components/parameters/time"
        - $ref: "#/components/parameters/team"
        - $ref: "#/components/parameters/league"
      responses:
        "200":
          description: A JSON array of live match objects.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/UpcomingMatch"

  /raw/siege/completed-matches/:
    get:
      tags: [siege]
      operationId: getSiegeCompletedMatches
      summary: Get completed Siege matches
      description: |
        Returns completed matches for the last 5 days. Contact us for access to older matches.
      parameters:
        - $ref: "#/components/parameters/date"
        - $ref: "#/components/parameters/matchid"
        - $ref: "#/components/parameters/time"
        - $ref: "#/components/parameters/team"
        - $ref: "#/components/parameters/league"
      responses:
        "200":
          description: A JSON array of completed match objects.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/CompletedMatch"

  /raw/siege/match-status/:
    get:
      tags: [siege]
      operationId: getSiegeMatchStatus
      summary: Get status of a Siege match
      parameters:
        - $ref: "#/components/parameters/matchidRequired"
        - $ref: "#/components/parameters/dateForOlderMatch"
      responses:
        "200":
          description: A JSON array containing a single match object with a match_status field.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/MatchStatusResponse"

  /raw/siege/league-mappings/:
    get:
      tags: [siege]
      operationId: getSiegeLeagueMappings
      summary: Get Siege league/tournament mappings
      parameters:
        - $ref: "#/components/parameters/league_id"
        - $ref: "#/components/parameters/name"
        - $ref: "#/components/parameters/min_prize_money"
      responses:
        "200":
          description: A JSON array of league mapping objects.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/LeagueMapping"

  /raw/siege/teams/:
    get:
      tags: [siege]
      operationId: getSiegeTeams
      summary: Get Siege teams
      parameters:
        - $ref: "#/components/parameters/id"
      responses:
        "200":
          description: A JSON array of team objects.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/TeamInfo"

  /raw/siege/players/:
    get:
      tags: [siege]
      operationId: getSiegePlayers
      summary: Get Siege players
      parameters:
        - $ref: "#/components/parameters/id"
      responses:
        "200":
          description: A JSON array of player objects.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/PlayerInfo"

  # ---------------------------------------------------------------------------
  # Cricket
  # ---------------------------------------------------------------------------
  /raw/cricket/upcoming-matches/:
    get:
      tags: [cricket]
      operationId: getCricketUpcomingMatches
      summary: Get upcoming Cricket matches
      description: |
        Cricket matches include additional fields such as confirmed_rosters and
        ground_details that are specific to this sport.
      parameters:
        - $ref: "#/components/parameters/date"
        - $ref: "#/components/parameters/matchid"
        - $ref: "#/components/parameters/time"
        - $ref: "#/components/parameters/team"
        - $ref: "#/components/parameters/league"
      responses:
        "200":
          description: A JSON array of upcoming match objects.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/CricketUpcomingMatch"

  /raw/cricket/live-matches/:
    get:
      tags: [cricket]
      operationId: getCricketLiveMatches
      summary: Get live Cricket matches
      description: |
        Returns matches that are currently live. The response format is the same as
        upcoming matches for Cricket.
      parameters:
        - $ref: "#/components/parameters/date"
        - $ref: "#/components/parameters/matchid"
        - $ref: "#/components/parameters/time"
        - $ref: "#/components/parameters/team"
        - $ref: "#/components/parameters/league"
      responses:
        "200":
          description: A JSON array of live match objects.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/CricketUpcomingMatch"

  /raw/cricket/completed-matches/:
    get:
      tags: [cricket]
      operationId: getCricketCompletedMatches
      summary: Get completed Cricket matches
      description: |
        Returns completed matches for the last 5 days. Contact us for access to older matches.
      parameters:
        - $ref: "#/components/parameters/date"
        - $ref: "#/components/parameters/matchid"
        - $ref: "#/components/parameters/time"
        - $ref: "#/components/parameters/team"
        - $ref: "#/components/parameters/league"
      responses:
        "200":
          description: A JSON array of completed match objects.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/CompletedMatch"

  /raw/cricket/match-status/:
    get:
      tags: [cricket]
      operationId: getCricketMatchStatus
      summary: Get status of a Cricket match
      parameters:
        - $ref: "#/components/parameters/matchidRequired"
        - $ref: "#/components/parameters/dateForOlderMatch"
      responses:
        "200":
          description: A JSON array containing a single match object with a match_status field.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/MatchStatusResponse"

  /raw/cricket/league-mappings/:
    get:
      tags: [cricket]
      operationId: getCricketLeagueMappings
      summary: Get Cricket league/tournament mappings
      parameters:
        - $ref: "#/components/parameters/league_id"
        - $ref: "#/components/parameters/name"
        - $ref: "#/components/parameters/min_prize_money"
      responses:
        "200":
          description: A JSON array of league mapping objects.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/LeagueMapping"

  /raw/cricket/teams/:
    get:
      tags: [cricket]
      operationId: getCricketTeams
      summary: Get Cricket teams
      parameters:
        - $ref: "#/components/parameters/id"
      responses:
        "200":
          description: A JSON array of team objects.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/TeamInfo"

  /raw/cricket/players/:
    get:
      tags: [cricket]
      operationId: getCricketPlayers
      summary: Get Cricket players
      parameters:
        - $ref: "#/components/parameters/id"
      responses:
        "200":
          description: A JSON array of player objects.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/PlayerInfo"

# =============================================================================
# Components
# =============================================================================
components:
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: API key provided by Rimble for authentication.

  # ---------------------------------------------------------------------------
  # Reusable Parameters
  # ---------------------------------------------------------------------------
  parameters:
    date:
      name: date
      in: query
      required: false
      description: >
        Filter matches by date in UTC. Format: YYYY-MM-DD (e.g. "2024-06-10").
      schema:
        type: string
        format: date
        example: "2024-06-10"

    matchid:
      name: matchid
      in: query
      required: false
      description: >
        Filter by match ID. A Rimble-created string that uniquely identifies each match.
      schema:
        type: string

    matchidRequired:
      name: matchid
      in: query
      required: true
      description: >
        The match ID to look up. Required for the match-status endpoint.
      schema:
        type: string

    dateForOlderMatch:
      name: date
      in: query
      required: false
      description: >
        Required if the match is older than 14 days. Format: YYYY-MM-DD.
      schema:
        type: string
        format: date

    time:
      name: time
      in: query
      required: false
      description: >
        Filter matches by start time in UTC. Format: HH:MM:SS using a 24-hour clock
        (e.g. "14:15:00").
      schema:
        type: string
        example: "14:15:00"

    team:
      name: team
      in: query
      required: false
      description: >
        Filter matches by team name. Spaces are permitted in the URL.
      schema:
        type: string

    league:
      name: league
      in: query
      required: false
      description: >
        Filter matches by league/tournament name. Spaces are permitted in the URL.
      schema:
        type: string

    league_id:
      name: league_id
      in: query
      required: false
      description: Filter league mappings by the Rimble league ID.
      schema:
        type: string

    name:
      name: name
      in: query
      required: false
      description: Filter league mappings by league/tournament name.
      schema:
        type: string

    min_prize_money:
      name: min_prize_money
      in: query
      required: false
      description: >
        Filter leagues with prize money at or above this amount (in USD).
        Useful for finding higher-tier tournaments.
      schema:
        type: integer

    id:
      name: id
      in: query
      required: false
      description: Filter by the Rimble-assigned entity ID.
      schema:
        type: string

  # ---------------------------------------------------------------------------
  # Schemas
  # ---------------------------------------------------------------------------
  schemas:
    # ---- Shared sub-objects ----

    LeagueDetails:
      type: object
      description: Information about the league/tournament the match belongs to.
      properties:
        id:
          type: string
          description: Rimble league/tournament ID.
        name:
          type: string
          description: Name of the league/tournament.
        image:
          type: string
          format: uri
          description: URL to the league logo image.

    MatchFormat:
      type: object
      description: Describes the format (style) in which the match is played.
      properties:
        type:
          type: string
          enum: [bestOf, numGames]
          description: >
            "bestOf" means the team that wins the majority of `count` games wins the match.
            "numGames" means a fixed number of games are played regardless of intermediate results.
        count:
          type: integer
          description: The number of games for the format type.
        metadata:
          type: array
          description: >
            Estimated start time and date for each game in the match. Only present on
            upcoming-matches endpoints.
          items:
            $ref: "#/components/schemas/GameEstimate"

    GameEstimate:
      type: object
      description: Estimated schedule for a single game within a match.
      properties:
        game_number:
          type: integer
          description: 1-indexed game number within the match.
        est_date:
          type: string
          format: date
          description: Estimated date of the game in UTC (YYYY-MM-DD).
        est_time:
          type: string
          description: Estimated start time in UTC (HH:MM:SS, 24-hour clock).

    PlayerBase:
      type: object
      description: Core player information shared across endpoints.
      properties:
        id:
          type: string
          description: Rimble-assigned unique player ID.
        username:
          type: string
          description: The in-game username of the player.
        name:
          type: string
          description: The player's real name.
        DOB:
          type: string
          format: date
          nullable: true
          description: >
            Date of birth (YYYY-MM-DD). Null if not publicly available.
        image:
          type: string
          format: uri
          description: URL to the player's profile image.

    UpcomingPlayer:
      allOf:
        - $ref: "#/components/schemas/PlayerBase"
        - type: object
          properties:
            role:
              type: string
              description: >
                The position/role the player plays (sport-specific, e.g. "top", "mid",
                "support", "jungle", "bottom" for LoL).
            player_expected_participation:
              type: boolean
              description: Whether this player is expected to participate in the match.

    CompletedPlayer:
      allOf:
        - $ref: "#/components/schemas/PlayerBase"
        - type: object
          properties:
            role:
              type: string
              description: The position/role the player plays (sport-specific).
            results:
              type: array
              description: Per-game results for this player. Schema varies by esport.
              items:
                $ref: "#/components/schemas/PlayerGameResult"
            participation_last5:
              type: integer
              description: >
                Number of games (out of last 5) where this player was on the starting roster.
            player_expected_participation:
              type: boolean
              description: Whether this player was expected to participate.
            rating:
              type: number
              format: float
              description: Post-match player performance rating.

    PlayerGameResult:
      type: object
      description: >
        Per-game statistics for a player. Fields vary by esport. Common fields are
        listed here; sport-specific fields (e.g. champion for LoL, ADR/KAST for CS:GO)
        will also be present.
      properties:
        game_number:
          type: integer
          description: 1-indexed game number this result belongs to.
        kills:
          type: integer
          nullable: true
          description: Number of kills.
        deaths:
          type: integer
          nullable: true
          description: Number of deaths.
        assists:
          type: integer
          nullable: true
          description: Number of assists.
      additionalProperties: true

    UpcomingTeam:
      type: object
      description: Team information for an upcoming or live match.
      properties:
        id:
          type: string
          description: Rimble-assigned unique team ID.
        name:
          type: string
          description: Team name.
        slug:
          type: string
          description: Shorthand identifier for the team.
        designation:
          type: integer
          enum: [1, 2]
          description: >
            1 for the "home" team (team_1), 2 for the "away" team (team_2).
            Teams are always ordered with team 1 at index 0.
        image:
          type: string
          format: uri
          description: URL to the team logo image.
        players:
          type: array
          items:
            $ref: "#/components/schemas/UpcomingPlayer"

    CompletedTeam:
      type: object
      description: Team information for a completed match, including results.
      properties:
        id:
          type: string
          description: Rimble-assigned unique team ID.
        name:
          type: string
          description: Team name.
        slug:
          type: string
          description: Shorthand identifier for the team.
        designation:
          type: integer
          enum: [1, 2]
          description: >
            1 for the "home" team (team_1), 2 for the "away" team (team_2).
        image:
          type: string
          format: uri
          description: URL to the team logo image.
        win_result:
          type: integer
          enum: [0, 1]
          description: 1 if the team won the match, 0 if it lost.
        games_won:
          type: integer
          description: Number of games this team won in the match.
        results:
          type: array
          description: Per-game team-level results. Fields vary by esport.
          items:
            $ref: "#/components/schemas/TeamGameResult"
        players:
          type: array
          items:
            $ref: "#/components/schemas/CompletedPlayer"

    TeamGameResult:
      type: object
      description: >
        Per-game team-level statistics. Fields vary by esport (e.g. towers/dragons/barons
        for LoL, rounds_won for CS:GO/Valorant).
      properties:
        game_number:
          type: integer
          description: 1-indexed game number.
        result:
          type: integer
          enum: [0, 1]
          description: 1 if the team won this game, 0 if it lost.
        game_length:
          type: integer
          description: Length of the game in seconds (where available).
      additionalProperties: true

    CompletedMatchMetadata:
      type: object
      description: >
        Metadata about individual games within a completed match, such as map names
        (CS:GO, Valorant) or team sides (LoL).
      properties:
        games:
          type: array
          items:
            type: object
            properties:
              game_number:
                type: integer
                description: 1-indexed game number.
              map_name:
                type: string
                description: Map name (for CS:GO, Valorant, Siege, etc.).
              blue_team:
                type: string
                description: Team on the blue side (LoL).
              red_team:
                type: string
                description: Team on the red side (LoL).
            additionalProperties: true

    # ---- Top-level match schemas ----

    UpcomingMatch:
      type: object
      description: An upcoming or live match.
      properties:
        date:
          type: string
          format: date
          description: Match date in UTC (YYYY-MM-DD).
        time:
          type: string
          description: Match start time in UTC (HH:MM:SS, 24-hour clock).
        matchid:
          type: string
          description: Rimble-assigned unique match identifier.
        team_1_name:
          type: string
          description: Name of team 1.
        team_2_name:
          type: string
          description: Name of team 2.
        league:
          type: string
          description: League/tournament name.
        source_url:
          type: string
          format: uri
          description: A URL for cross-referencing this match with external sources.
        match_format:
          $ref: "#/components/schemas/MatchFormat"
        league_details:
          $ref: "#/components/schemas/LeagueDetails"
        stream_links:
          type: array
          description: URLs to live streams for this match.
          items:
            type: string
            format: uri
        teams:
          type: array
          items:
            $ref: "#/components/schemas/UpcomingTeam"

    CricketUpcomingMatch:
      allOf:
        - $ref: "#/components/schemas/UpcomingMatch"
        - type: object
          description: >
            Cricket upcoming match with additional cricket-specific fields.
          properties:
            confirmed_rosters:
              type: boolean
              description: Whether the rosters have been confirmed for this match.
            ground_details:
              type: object
              description: Details about the ground/venue.
              properties:
                id:
                  type: string
                  description: Ground identifier.
                name:
                  type: string
                  description: Name of the ground/venue.

    CompletedMatch:
      type: object
      description: A completed match with full results.
      properties:
        date:
          type: string
          format: date
          description: Match date in UTC (YYYY-MM-DD).
        time:
          type: string
          description: Match start time in UTC (HH:MM:SS, 24-hour clock).
        matchid:
          type: string
          description: Rimble-assigned unique match identifier.
        team_1_name:
          type: string
          description: Name of team 1.
        team_2_name:
          type: string
          description: Name of team 2.
        league:
          type: string
          description: League/tournament name.
        source_url:
          type: string
          format: uri
          description: A URL for cross-referencing this match with external sources.
        match_format:
          $ref: "#/components/schemas/MatchFormat"
        league_details:
          $ref: "#/components/schemas/LeagueDetails"
        metadata:
          $ref: "#/components/schemas/CompletedMatchMetadata"
        stream_links:
          type: array
          description: URLs to live streams for this match.
          items:
            type: string
            format: uri
        teams:
          type: array
          items:
            $ref: "#/components/schemas/CompletedTeam"
        match_winner:
          type: string
          description: >
            The designation ("1" or "2") of the winning team. Present for some esports
            (e.g. Valorant).
        team_1_score:
          type: string
          description: Team 1 score (present for some esports).
        team_2_score:
          type: string
          description: Team 2 score (present for some esports).

    MatchStatusResponse:
      allOf:
        - $ref: "#/components/schemas/CompletedMatch"
        - type: object
          description: >
            Match object returned by the match-status endpoint. Always includes
            match_status. Other fields depend on the current status of the match.
          required:
            - match_status
          properties:
            match_status:
              type: string
              enum: [upcoming, live, ended, completed, cancelled]
              description: |
                Current status of the match:
                - `upcoming` - the match is scheduled for the future
                - `live` - at least one game in the match is being played right now
                - `ended` - the match has ended but not all markets have been settled yet
                - `completed` - the match has ended and all data is available
                - `cancelled` - the match does not exist or was cancelled

    # ---- Metadata endpoints ----

    LeagueMapping:
      type: object
      description: >
        League/tournament metadata for a given esport. Use min_prize_money to filter
        for higher-tier events.
      properties:
        id:
          type: string
          description: Rimble league/tournament ID.
        name:
          type: string
          description: Name of the league/tournament.
        dates:
          type: string
          description: Date range or description of when the league/tournament takes place.
        prize_money:
          type: integer
          description: >
            Prize money in USD. A proxy indicator for the tier of the league/tournament.

    TeamInfo:
      type: object
      description: >
        Team metadata for bulk updates. Note this endpoint is not actively maintained
        but provides a starting point with relevant team information.
      properties:
        id:
          type: string
          description: Rimble-assigned unique team ID.
        name:
          type: string
          description: Team name.
        image:
          type: string
          format: uri
          description: URL to the team logo image.

    PlayerInfo:
      type: object
      description: >
        Player metadata for bulk updates. Note this endpoint is not actively maintained
        but provides a starting point with relevant player information.
      properties:
        id:
          type: string
          description: Rimble-assigned unique player ID.
        username:
          type: string
          description: In-game username.
        name:
          type: string
          description: Player's real name.
        DOB:
          type: string
          format: date
          nullable: true
          description: Date of birth (YYYY-MM-DD). Null if not publicly available.
        image:
          type: string
          format: uri
          description: URL to the player's profile image.
