leaderboard

Get a leaderboard

Returns the leaderboard for the caller's team.

get/leaderboard

Request

  • Base URL
    https://api.heytaco.com
  • Auth
    HTTP bearer

Query parameters

type'received' | 'given' | 'combined' required

The kind of totals to rank by.

timeframe'custom' | 'alltime' | 'year' | 'month' | 'week' | 'today' required

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

channel_idstring

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

timezonestring

An IANA time zone name.

start_datestring date

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

end_datestring date

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

limitinteger

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.

Response

A leaderboard report.

object'leaderboard' required

Object type. Always leaderboard.

type'received' | 'given' | 'combined' required

The kind of totals ranked. One of received, given, or combined.

timeframe'custom' | 'alltime' | 'year' | 'month' | 'week' | 'today' required

The window used to compute the leaderboard.

timezonestring required

The time zone the window was computed in, in canonical form (e.g. US/Pacific → America/Los_Angeles). America/Los_Angeles when omitted.

start_datestring date nullable required

null for alltime; echoed for custom; computed in timezone for named timeframes.

end_datestring date nullable required

null for alltime; echoed for custom; computed in timezone for named timeframes.

channel_idstring nullable required

Echo of the request channel_id, or null when omitted.

total_resultsinteger required

Total number of entries available for the request, before limit is applied.

limitinteger nullable required

Echo of the request limit, or null when omitted.

Example response

{
  "timezone": "America/New_York"
}

Changes

No recorded changes to this operation across all 1 revision of this API.