Skip to content

Rank

GET /rank

Rank

Authorization

Send Authorization: <Twitch Extension Client ID> <Muxy JWT>. The JWT role must satisfy the endpoint requirements shown in the examples.

Parameters

Name In Required Type Constraints Description
id query no string default "default" The ranking-buffer ID that identifies a question for which responses are ranked.

Responses

200 Response

200

Content type: application/json

Schema
{
  "type": "object",
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string",
            "example": "DOTA"
          },
          "score": {
            "type": "integer",
            "example": 12,
            "default": 0
          }
        }
      }
    }
  }
}
Result
{
  "data": [
    {
      "key": "DOTA",
      "score": 12
    },
    {
      "key": "FIFA 2014",
      "score": 8
    }
  ]
}

400 Error

400

Content type: application/json

Schema
{
  "type": "object",
  "properties": {
    "reason": {
      "type": "string"
    }
  }
}
Example
{
  "reason": "400"
}

Examples

Curl

curl --request GET \
  --url https://api.muxy.io/v1/e/rank?id=next-game \
  --header 'authorization: <Client ID> <backend, admin, or broadcaster JWT>' \
  --header 'content-type: application/json'

Generated API reference

This endpoint is generated from rest-v1.yaml.