API-BASKETBALL

FREEMIUM
Verified
Door API-SPORTS | Bijgewerkt hace 21 días | Sports
Populariteit

9.9 / 10

Latency

348ms

Serviceniveau

100%

Health Check

N/A

Terug naar alle discussies

Meaning of available seasons API endpoint

Rapid account: Sandhyaneer 1
sandhyaneer1
hace 2 años
Hi, can anyone tell me what the significance of the **Seasons** endpoint is? It returns a list of available seasons, but for which league? All the 250 leagues available in the API? Seems unlikely. It seems more like returning the available season for a particular league, but the API payload does not take any league id as parameter.
Rapid account: Api Sports
api-sports Commented hace 2 años

Hi,

The endpoint “seasons” returns the list of seasons available for all competitions.

If you want to have the list of seasons for one or more competitions you have to call the endpoint “leagues” ==> https://api-sports.io/documentation/basketball/v1#operation/get-leagues

Example :

{
“get”: “leagues”,
“parameters”: {
“id”: “12”
},
“errors”: [],
“results”: 1,
“response”: [
{
“id”: 12,
“name”: “NBA”,
“type”: “League”,
“logo”: null,
“country”: {
“id”: 5,
“name”: “USA”,
“code”: “US”,
“flag”: “https://media.api-football.com/flags/us.svg
},
“seasons”: [
{
“season”: “2019-2020”,
“start”: “2019-10-04”,
“end”: “2020-04-16”
},
{
“season”: “2018-2019”,
“start”: “2018-09-28”,
“end”: “2019-05-24”
},
{
“season”: “2017-2018”,
“start”: “2017-10-01”,
“end”: “2018-06-09”
},
{
“season”: “2016-2017”,
“start”: “2016-10-01”,
“end”: “2017-06-13”
},
{
“season”: “2015-2016”,
“start”: “2015-10-03”,
“end”: “2016-06-20”
}
]
}
]
}

Doe mee aan de discussie - voeg hieronder een opmerking toe

Log in / Schrij u in om nieuwe opmerkingen te plaatsen