Events
Competitions
-
Competitions by sport
- List of open competitions for a given sport.
- Returns all countries by default.
GETGETSample request/sports/:id/competitions/sports/1/competitionsaccept: application/jsoncurl -X GET -H "accept: application/json" "http://my-api.com/sports/1/competitions"Response 200 OKcontent-type: application/json{ "competitions": [ { "id": 1, "country": "gb", "name": "English premier league" }, { "id": 2, "country": "fr", "name": "Coupe de France" } ] } -
Filter by country
- Only get competitions for a given country
- Uses the official ISO country codes
GETGETSample request/sports/:id/competitions?country=$country/sports/1/competitions?country=fraccept: application/jsoncurl -X GET -H "accept: application/json" "http://my-api.com/sports/1/competitions?country=fr"Response 200 OKcontent-type: application/json{ "competitions": [ { "id": 2, "country": "fr", "name": "Coupe de France" } ] }
Sports
-
Get list of sports
- list is ordered alphabetically
- doesn't return sports with no active competitions
GETGETSample request/sports/sportsaccept: application/jsoncurl -X GET -H "accept: application/json" "http://my-api.com/sports"Response 200 OKcontent-type: application/json{ "sports": [ { "id": 1, "name": "Soccer" }, { "id": 2, "name": "Tennis" } ] }