HeyTacoAPI
Leaderboard

Get a leaderboard

Returns the leaderboard for the caller's team.

GET
/leaderboard

Returns the leaderboard for the caller's team.

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Query Parameters

type*string

The kind of totals to rank by.

Value in

  • "received"
  • "given"
  • "combined"
timeframe*string

Leaderboard timeframe. Selecting custom also requires start_date/end_date. When type=combined, only alltime and year are supported.

Value in

  • "custom"
  • "alltime"
  • "year"
  • "month"
  • "week"
  • "today"
channel_id?string

Filter leaderboard to taco messages sent in a single channel. Not allowed when type=combined.

Length1 <= length
timezone?string

An IANA time zone name.

Default"America/Los_Angeles"
start_date?string

Required and only valid when timeframe=custom. Format YYYY-MM-DD, interpreted in timezone.

Formatdate
end_date?string

Required and only valid when timeframe=custom. Format YYYY-MM-DD, interpreted in timezone. Inclusive.

Formatdate
limit?integer

Maximum number of entries to return in data. When omitted, all entries are returned. total_results in the response reflects the total count before this limit is applied.

Range1 <= value

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/leaderboard?type=received&timeframe=month&timezone=America%2FNew_York"
{  "object": "leaderboard",  "type": "received",  "timeframe": "custom",  "timezone": "string",  "start_date": "2019-08-24",  "end_date": "2019-08-24",  "channel_id": "string",  "total_results": 0,  "limit": 0,  "data": [    {      "rank": 0,      "user_id": "string",      "name": "string",      "avatar_url": "http://example.com",      "total": 0,      "total_given": 0,      "total_received": 0    }  ]}