4.1. GetLeagues
This method retrieves the list of leagues from the system.
Â
Request
Method | URL |
---|---|
GET | /AsianOddsService/GetLeagues?sportsType={SportsType}&marketTypeId={marketTypeId}&bookies={ALL|List of Bookies}&since={since} |
Type | Params | Values |
---|---|---|
HEADER | AOToken | string |
HEADER | Accept | application/json |
QUERY STRING | bookies | string |
QUERY STRING | sportsType | Int |
QUERY STRING | marketTypeId | Int |
QUERY STRING | since | long |
Â
Request Values
Value | What is this for |
---|---|
AOToken | Token generated also by the Login method. This token identifies which user is requesting or executing the API Method. This has to be sent for all of the request except during execution of the Login method |
accept | application/json |
bookies(optional) | List of Bookies separated by comma(,). If you want all bookies, then please use ALL keyword. Note that this is an optional field and without any value means that you have chosen ALL bookies. |
sportsType(optional) | Type of sports of which leagues to display. If none specified, then by default all will be shown. SportsType can be retrieved by calling GetSports. |
marketTypeId(required) | MarketTypeId refers to the type of market. Valid Values are {0,1,2} |
since(optional) | Since is a delta switch. The value expected is a milliseconds since last epoch. When specified, the data returned are only the data that was generated since the value of this. This is normally used to return subset of data that have been updated. |
Â
Response Values
Value | What is this for |
---|---|
Code | Holds the status of the response. If it’s 0, then it is successful. Negative values indicate failure |
Bookies | Bookies for the particular league |
LeagueID | Unique identification of League |
LeagueName | Name of the League |
SportsType | Sports type |
Since | Last Updated Date in Milliseconds since epoch |
MarketTypeId | MarketType of the League where it is part of. Value can be any of the below : |
Â
Sample JSON Response
Response Type | Response |
---|---|
Success | Code: 0, |
Fail | { |