Appearance
Fetch leaderboard
GET
https://athena.stack.so/leaderboard/{leaderboardLabel}
is a public endpoint so there is no need to specify API key
URL Params
Name | Description | Example |
---|---|---|
includeMetadata | boolean to specify if metadata about leaderboard should be returned | true/false |
includeIdentities | boolean to specify if user's social identities should be returned when available i.e. ENS, Farcaster, Lens | true/false |
limit | optional pagination parameter | |
offset | optional pagination parameter |
Examples
cURL
shell
curl --request GET \
--url "https://athena.stack.so/leaderboard/747airlines?includeMetadata=true&includeIdentities=true&limit=3"
Python
python
import requests
url = "https://athena.stack.so/leaderboard/{leaderboardLabel}"
params = {
"includeMetadata": "true",
"includeIdentities": "true",
"limit": "3"
}
response = requests.get(url, params=params)
Go
go
package main
import (
"fmt"
"io/ioutil"
"net/http"
"net/url"
)
type Request struct {
Addresses []string `json:"addresses"`
}
func main() {
baseURL := fmt.Sprintf("https://athena.stack.so/leaderboard/%s", "747airlines")
url, _ := url.Parse(baseURL)
q := url.Query()
q.Add("includeMetadata", "true")
q.Add("includeIdentities", "true")
q.Add("limit", "3")
url.RawQuery = q.Encode()
res, _ := http.Get(url.String())
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}