API-BASKETBALL

부분 유료
Verified
분류별 API-SPORTS | 업데이트됨 20 days ago | Sports
인기

9.9 / 10

지연 시간

348ms

서비스 수준

100%

Health Check

N/A

모든 토론으로 돌아가기

Meaning of available seasons API endpoint

Rapid account: Sandhyaneer 1
sandhyaneer1
2 years ago
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 years ago

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

아래에 의견을 추가하고 토론에 참여하세요.

새 댓글을 게시하려면 로그인 / 가입