beta GetLeagues - Saba-sports/OddsDirectAPI GitHub Wiki
This API is to get how many events count for each league.
Request
GET /sports/{version}/GetLeagues?from=2021-02-28&language=cs
Accept: application/json
Accept-Encoding: br, gzip, deflate
X-Forwarded-For: client ip (If using API via proxy)
Authorization: Bearer {JWT token}
Parameter |
Description |
query |
Specific the query parameters for using odata query format |
from |
Specific the start date of the data. It can be inputted separately |
until |
Specific the end date of the data. It can be inputted separately |
language |
Specific the language of the response context |
Response
{
"leagues": League[]
}
Name |
Format |
Description |
leagues |
array |
Specifies the information of leagues |
League
{
"leagueId": int,
"leagueName": string,
"sportType": int,
"sportName": string,
"liveGameCount": int,
"gameCount": int,
"isParlay": bool
}
Name |
Format |
Description |
Queryable |
Query Example |
leagueId |
int |
Specifies the identifier of the league. |
Yes |
$filter=leagueid eq 56038 |
leagueName |
string |
Specifies the name of the league. |
Yes |
$filter=leaguename eq '*UEFA CHAMPIONS LEAGUE' or $filter=contains(leaguename,'NBA') |
sportType |
int |
Specifies the identifier of the sport. |
Yes |
$filter=sporttype eq 1 |
sportName |
string |
Specifies the name of the sport. |
Yes |
$filter=sportname eq 'Basketball' |
liveGameCount |
int |
Specifies the number of the live events. |
No |
- |
gameCount |
int |
Specifies the number of the non-live events. |
No |
— |
isParlay |
bool |
Specifies whether the event is a parlay. |
Yes |
$filter=isparlay eq true |