curl "https://api.basketballapi.net/v1/players/pl_4S9RZVWN/seasons?competition=cp_11A6HQXJ" \
-H "Authorization: Bearer bba_live_your_key"
import requests
r = requests.get("https://api.basketballapi.net/v1/players/pl_4S9RZVWN/seasons?competition=cp_11A6HQXJ",
headers={"Authorization": "Bearer bba_live_your_key"})
print(r.json()["data"])
const r = await fetch("https://api.basketballapi.net/v1/players/pl_4S9RZVWN/seasons?competition=cp_11A6HQXJ", {
headers: { Authorization: "Bearer bba_live_your_key" }
});
const { data } = await r.json();
$ctx = stream_context_create(['http' => [
'header' => "Authorization: Bearer bba_live_your_key",
]]);
$r = json_decode(file_get_contents("https://api.basketballapi.net/v1/players/pl_4S9RZVWN/seasons?competition=cp_11A6HQXJ", false, $ctx), true);
200Example answer, in shape
{
"data": {
"player": {
"id": "pl_EDA561C6",
"name": "Example name"
},
"seasons": [
{
"season": {
"id": "ss_EBC81C6D",
"name": "Example name"
},
"competition": {
"id": "cp_929127FC",
"name": "Example name"
},
"team": {
"id": "tm_8EB4D858",
"name": "Example name"
},
"games": 34,
"starts": 12,
"minutes": 7.5,
"points": 7.5,
"rebounds": 7.5,
"assists": 7.5,
"steals": 7.5,
"blocks": 7.5,
"turnovers": 7.5,
"field_goal_pct": 7.5,
"three_pct": 7.5,
"free_throw_pct": 7.5
}
]
},
"meta": { "plan": "Free key" }
}