Skip to content

How to format queues.json file? #1

@jjmaldonis

Description

@jjmaldonis

We want to provide a file with information about queues so that developers can automatically update their queues data without modifying code.

Below is the current idea for the format. In this issue I will try to summarize the discussion we've had about the format.

"Queue": {
  "id": int,
  "maps": List[int],
  "ranked": bool,
  "gameMode": str,
  "deprecated": bool,
  "name": str
}

Other relevant files might include: gameModes.json, gameTypes.json, seasons.json, and maybe a new maps.json file with additional information. Note that there are only three game types that Riot uses: CUSTOM_GAME, TUTORIAL_GAME, and MATCHED_GAME.

Notes about Queues:

  • The goal is to provide queue information to developers so they can automatically update their application using a request. We will provide a queues.json file via an API endpoint in CDragon.

  • We need to find the correct balance between providing enough information and being able to easily maintain that information. We have decided to provide a minimum amount of information to the consumer, but enough that is useful for the majority of use cases.

  • It's much easier to add information than it is to remove it. If we remove information in a file, it will break applications; if we add information, all consumers benefit.

  • The format for all files, including queues.json needs to be future-proof, meaning that it should be simple enough that expected changes to Riot's Queue data shouldn't break the format of the json data we provide.

  • We have opted for the naming scheme "Coop vs. AI" rather than "PvE"/"PvP" because very few game modes are truly player-vs.-environment. Coop vs. AI therefore captures the "competitive" vs. "non-competitive" natures of the different queues.

  • The "Coop vs. AI" vs. "Matched" naming schemes need to be applied to Queues rather than Game Modes because the game mode CLASSIC has queues that are both ranked and coop vs. AI. However, the rules of the game are properties of Game Modes rather than Queues.

  • We decided not to correlate deprecated queues with the new queues for a few reasons: 1) Some queues do not get replaced, and it's unclear where the line is for a "replaced" queue (for example, was Dominion replaced with Definitely Not Dominion, or is that a new queue? what about Ascension? The answer to these questions depends on the application.); 2) Because of (1), the syntax for parsing this information will not be obvious to the consumer; 3) The goal of this data would be to allow consumers to construct a list of queues that are all similar. It would be much simpler for us to just provide that information (a list of similar queues) rather than provide the "replaced with" logic, and it better supports the consumers' use case.

  • On that note, we will provide fields for each Queue that will allow the user to find ranked queues, 5v5 ranked queues, etc. We may also provide a separate endpoint with a list of queue ids for different categories of game modes (e.g. Ranked, Dominion, ARAM, etc).

  • Some APIs (including the Riot API) do not serve data that is equal to the default value. For example, 0s or False or null are often omitted to save on bandwidth. For this file (and for similar files), we prefer not to omit this type of "base" data because it makes the data harder to understand. For example, a consumer might wonder if a piece of data is omitted because it doesn't exist rather than because the value is zero.

  • The names that Riot assigns to their queues are not unique. We may come up with a better naming scheme ourselves. This is an excellent example of the tradeoff between maintainability and providing useful data. Hopefully any new naming scheme we develop can be generated from the fields of a Queue.

  • Below in a snippet from one of Pupix's gists that contains information about what Riot considers part of a Queue:

"QueueResource": {
    "properties": {
        "areFreeChampionsAllowed": { "type": "boolean" },
        "id": { "type": "integer" },
        "isRanked": { "type": "boolean" },
        "isTeamOnly": { "type": "boolean" },
        "mapId": { "type": "integer" },
        "minLevel": { "type": "integer" },
        "mode": { "$ref": "#/definitions/GameMode" },
        "numPlayersPerTeam": { "type": "integer" },
        "queueName": { "type": "string" },
        "type": { "type": "string" }
    },  
}
  • We have opted not to include information such as minLevel -- it's just too much information to keep track of without an automated way to extract it, and it isn't all that useful to consumers creating, for example, a web app.

We will try to maintain a TODO list in the comments.

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