API-BASKETBALL

免费增值
Verified
通过 API-SPORTS | 已更新 20 giorni fa | Sports
人气

9.9 / 10

延迟

348ms

服务等级

100%

Health Check

N/A

返回所有讨论

Meaning of available seasons API endpoint

Rapid account: Sandhyaneer 1
sandhyaneer1
2 anni fa
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 2 anni fa

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”
}
]
}
]
}

加入讨论 - 在下面添加评论:

登录/注册以发布新的评论