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.The date time string format should be like: "2021-01-01T00:00:00", encodable |
| until |
Specific the end date of the data. It can be inputted separately.The date time string format should be like: "2021-01-01T00:00:00", encodable |
| language |
Specific the language of the response context |
| isVirtual |
Whether to query virtual events. true = query only virtual events, false = exclude virtual events, omitted = query all events. |
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,
"leagueIconUrl": string
}
| 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 |
| leagueIconUrl |
string |
Specifies the URL of the league icon. |
Yes |
$filter=leagueIconUrl eq 'https://cmbi.licimg.com/LeagueImg/league_flag.png' |