dev.tsunagite.getLeaderboard

tsunagite.dev

Documentation

List the leaderboard for a given chart. Does not require auth.

main query

List the leaderboard for a given chart. Does not require auth.

Parameters

chart string at-uri Required

Must point to type `dev.tsunagite.chart`

cursor integer Optional

The index of the highest score to query in this slice.

inputMethod string Optional

No description available.

limit integer Optional

How many scores to get in this slice.

mode string Optional

No description available.

sortBy string record-key Optional

The ID of the score component to sort the leaderboard by. Will default to the game's default component if not present. Set to `timestamp` to sort by newest/oldest.

versions array of bytes Optional

The md5 hashes of the chart versions to list scores for. Will default to the chart's current ranked versions if not present.

Output

Encodingapplication/json

Errors

chartNotFound No chart matching the given URI was found.
invalidComponent No score component for the game matching the given ID was found.
cursorOutOfBounds There are fewer scores than the requested cursor point.
Try It

Requests are sent directly from your browser. Some servers may block requests due to CORS.

Base URL for XRPC calls (e.g., https://api.bsky.social)
Parameters
Must point to type `dev.tsunagite.chart`
The index of the highest score to query in this slice.
How many scores to get in this slice.
The ID of the score component to sort the leaderboard by. Will default to the game's default component if not present. Set to `timestamp` to sort by newest/oldest.
The md5 hashes of the chart versions to list scores for. Will default to the chart's current ranked versions if not present.
View raw schema
{
  "type": "query",
  "errors": [
    {
      "name": "chartNotFound",
      "description": "No chart matching the given URI was found."
    },
    {
      "name": "invalidComponent",
      "description": "No score component for the game matching the given ID was found."
    },
    {
      "name": "cursorOutOfBounds",
      "description": "There are fewer scores than the requested cursor point."
    }
  ],
  "output": {
    "schema": {
      "ref": "dev.tsunagite.getLeaderboard#leaderboard",
      "type": "ref"
    },
    "encoding": "application/json"
  },
  "parameters": {
    "type": "params",
    "required": [
      "chart"
    ],
    "properties": {
      "mode": {
        "type": "string"
      },
      "chart": {
        "type": "string",
        "format": "at-uri",
        "description": "Must point to type `dev.tsunagite.chart`"
      },
      "limit": {
        "type": "integer",
        "default": 50,
        "maximum": 100,
        "minimum": 1,
        "description": "How many scores to get in this slice."
      },
      "cursor": {
        "type": "integer",
        "minimum": 0,
        "description": "The index of the highest score to query in this slice."
      },
      "sortBy": {
        "type": "string",
        "format": "record-key",
        "description": "The ID of the score component to sort the leaderboard by. Will default to the game's default component if not present. Set to `timestamp` to sort by newest/oldest."
      },
      "versions": {
        "type": "array",
        "items": {
          "type": "bytes",
          "maxLength": 16,
          "minLength": 16
        },
        "description": "The md5 hashes of the chart versions to list scores for. Will default to the chart's current ranked versions if not present."
      },
      "inputMethod": {
        "type": "string"
      }
    }
  },
  "description": "List the leaderboard for a given chart. Does not require auth."
}
leaderboard object

A sorted leaderboard of associated scores, with an index for assembling longer leaderboards.

Properties

cursor integer Optional

The integer index of the next score after this slice. If not present, no further scores remain.

minimum: 0
View raw schema
{
  "type": "object",
  "properties": {
    "cursor": {
      "type": "integer",
      "minimum": 0,
      "description": "The integer index of the next score after this slice. If not present, no further scores remain."
    },
    "scores": {
      "type": "array",
      "items": {
        "ref": "dev.tsunagite.defs#associatedScore",
        "type": "ref"
      },
      "description": "The scores in this slice of leaderboard, sorted in descending order by the specified property."
    }
  },
  "description": "A sorted leaderboard of associated scores, with an index for assembling longer leaderboards."
}

Lexicon Garden

@