GetSports push - Saba-sports/OddsDirectAPI GitHub Wiki
This API is to get how many events count and parlay count for each sport.
- Subscribing to updates and retrieving data in one request via this API.
Request
GET /sports/stream/{version}/GetSports?until=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.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 content |
token |
Get the JWT token through /login or /refreshToken |
Response
id: string\r\n
data: {
"status": int,
"message":string,
"payload": {
"events":{
"add": Sport[],
"change":SportChange[],
"remove":[sporttype1,sporttype2...]
}
}
}\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 |
sports |
object |
Specifies the information of sports. |
Sprots object
Name |
Format |
Description |
add |
Sport array |
Specifies the sport information which be added.- Sport class please reference GetSports response. |
change |
SportChange array |
Specifies the sport information which be updated.- please refer to the following. |
remove |
int array |
Specifies the identified of the event which be removed. |
SportChange information
Name |
Format |
Description |
sportType |
int |
Specifies the identifier of the sport. |
liveGameCount |
int |
Specifies the number of the live events. |
gameCount |
int |
Specifies the number of the non-live events. |
liveParlayGame |
int |
Specifies the number of the live parlay’s events. |
parlayGame |
int |
Specifies the number of the non-live parlay’s events. |
outrightGame |
int |
Specifies the number of the outright’s events. |