Introduction
The FUMBBL API is designed for use by people who wish to extract data from the FUMBBL system without having to parse HTML pages.
Basic architecture
An API request
must be done over SSL and follows a standardised syntax as follows:
https ://
fumbbl.com /
api /
component /
command [ /
parameters ] [ /
xml ]
Component and command are both mandatory for all API requests. Parameters are specified for each command. Results are returned in JSON by default, unless the request is suffixed with /xml in which case the result is returned in XML format. For the default JSON format, (successful) results are returned in array form (either numeric or associative).
Error handling
TODO: Write some intro here, example as follows:
JSON | XML |
---|
Format:
Error:code message
Example:
"Error:1 Unsupported API component."
| Format: <?xml version="1.0"?>
<error>
<code> code </code>
<message> message </message>
</error>
Example:<?xml version="1.0"?>
<error>
<code>1</code>
<message>Unsupported API component.</message>
</error> |
Authentication
The FUMBBL API uses
OAuth 2.0 for authentication. To access API commands that require user authentication, the OAuth access_token must be supplied as per the OAuth specification.
TODO: Actually implement this.. And finalise documentation.
API Components
/api/coach | Coach API Component |
---|
/api/coach/search/[search string]
Description: Performs a coach search, returning a list of up to 10 coaches whose coach names start with the supplied search string.
Parameters: search string : The search string. Must be three characters or longer. For less than three characters, an empty result is returned.
Result: A list of simple coach id/name pairs.
Example:
JSON | XML |
---|
Request: https://fumbbl.com/api/coach/search/chris Response: [{"id":"3545","value":"chris"},{"id":"55597","value":"chris6"},{"id":"38726","value":"chrisp"},{"id":"38907","value":"ChrisQ"},{"id":"49260","value":"ChrisC"},{"id":"20503","value":"ChrisK"},{"id":"34045","value":"Chrisi"},{"id":"71057","value":"ChrisL"},{"id":"91561","value":"ChrisH"},{"id":"129739","value":"chriss"}] | Request: https://fumbbl.com/api/coach/search/chris/xml Response:<?xml version="1.0"?>
<coaches>
<coach id="3545">chris</coach>
<coach id="55597">chris6</coach>
<coach id="38726">chrisp</coach>
<coach id="38907">ChrisQ</coach>
<coach id="49260">ChrisC</coach>
<coach id="20503">ChrisK</coach>
<coach id="34045">Chrisi</coach>
<coach id="71057">ChrisL</coach>
<coach id="91561">ChrisH</coach>
<coach id="129739">chriss</coach>
</coaches> |
|
/api/roster | Roster API Component |
---|
Text goes here
|
/api/ruleset | Ruleset API Component |
---|
Text goes here
|