GetLeagues push - Saba-sports/OddsDirectAPI GitHub Wiki
This API is to get how many events count for each league.
- Subscribing to updates and retrieving data in one request via this API.
Request
GET /sports/stream/{version}/GetLeagues?from=2021-02-28&language=cs
Accept: text/event-stream
Accept-Encoding: br, gzip, deflate(If Header is available)
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 content |
token |
Get the JWT token through /login or /refreshToken |
Response
id: string\r\n
data: {
"status": int,
"message":string,
"payload": {
"leagues":{
"add": League[],
"change":LeagueChange[],
"remove":LeagueRemove[]
}
}
}\r\n\r\n
Name |
Format |
Description |
id |
string |
Specifies the serial number of Server Sent Event |
data |
json |
|
Data object
Name |
Format |
Description |
status |
int |
Specifies the status code of the response. |
message |
string |
Specifies the message of the status. |
payload |
object |
|
Payload object
Name |
Format |
Description |
leagues |
object |
Specifies the information of leagues. |
Leagues object
Name |
Format |
Description |
add |
League array |
Specifies the league information which be added.- League class please reference GetLeagues response. |
change |
LeagueChange array |
Specifies the league information which be updated.- please refer to the following. |
remove |
LeagueRemove array |
Specifies the league information which be removed.- please refer to the following. |
LeagueChange information
Name |
Format |
Description |
leagueId |
int |
Specifies the identifier of the league. |
liveGameCount |
int |
Specifies the number of the live events. |
gameCount |
int |
Specifies the number of the non-live events. |
isParlay |
bool |
Specifies whether the event is a parlay. |
LeagueRemove information
Name |
Format |
Description |
leagueId |
int |
Specifies the identifier of the league. |
isParlay |
bool |
Specifies whether the event is a parlay. |