api.thechels.co.uk

Api V3.0.0 © 2014 ChelseaStats

EndPoint

All services are accessed from the following HTTP endpoint

http://api.thechels.co.uk

Response

JSON(P) only. CORS is enabled.

Each response comes with an appropriate HTTP status code (except for JSONP requests). These include `200` for success, `400` for bad request, `404` for not found and `500` for server error. The HTTP status code is also included in the response body along with a status message.

A 200 response and you'll also get some data

Authentication

This api does not require any authentication

Error Handling

To check for errors, simply examine the HTTP response code. `200` response indicates success while any other code will provide important information about why an error occured.

Alternatively you can examine HTTP Status code in the `status` property in the result body.

All JSONP requests return `200` responses because of the silent error problem, so you need use the latter method to check for errors.

Available Data Fields

FieldDescription
TeamTeam. All current teams Chelsea have faced. (ALL = 0)

Teams are recorded as their full name with underscores replacing spaced for example `MANCHESTER_CITY`

LocationLocation. Shows the location of the match, Home (H), Away (A) or Neutral (N). (ALL = 0)
ResultResult. Shows the outcome of the match, Win (W), Draw (D), Loss (L). (ALL = 0)

In cup competitions where games are level at the end of Extra Time and are settled on penalties are recorded as draws.

LimitLimit. restricts the data return upto :n number of games, if they exist. Data is in descending order, i.e. /6 at the end of your api call would return the last `6` results.

Methods

Available methods listed below.
Team Lookup

Returns all teams available

GET/ http://api.thechels.co.uk/team/

Look up a team. Returns all available data if found

GET/ http://api.thechels.co.uk/team/:team

Returns `:n` most recent results against `:team`

GET/ http://api.thechels.co.uk/team/:team/:n
Location Lookup

returns all locations available

GET/ http://api.thechels.co.uk/location/

Look up a location. Returns all available data if found

GET/ http://api.thechels.co.uk/location/:location

returns `:n` most recent results at `:location`

GET/ http://api.thechels.co.uk/location/:location/:n
Result Lookup

returns all results availble

GET/ http://api.thechels.co.uk/result/

Look up a result. Returns all available data if found

GET/ http://api.thechels.co.uk/result/:result

returns `:n` most recent results `:result`

GET/ http://api.thechels.co.uk/result/:result/:n