API-BASKETBALL

フリーミアム
Verified
よって API-SPORTS | 更新済み 20 дней назад | Sports
人気

9.9 / 10

レイテンシー

348ms

サービスレベル

100%

Health Check

N/A

すべてのディスカッションに戻る

Meaning of available seasons API endpoint

Rapid account: Sandhyaneer 1
sandhyaneer1
2 года назад
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 года назад

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

ディスカッションに参加しましょう-以下にコメントを追加してください:

ログイン/サインアップして新しいコメントを投稿