Unofficial API to check Oyster balance (hopefully more including travel history soon).
I (@bencevans) run a version of this at https://oyster-scrape-api.herokuapp.com
or http://oyster.bensbit.co.uk
. You're welcome to use this but I provide no warranty as to uptime or security.
Oyster API uses HTTP Basic authentication using you oyster username and password.
$ curl http://oyster-api.bensbit.co.uk/balance -u username:password
Invalid Authentication Response
HTTP/1.1 401
{
"error": "Authentication Invalid"
}
Missing Credentials
HTTP/1.1 401
{
"error": "Authentication Not Provided"
}
GET /valid_auth
If authentication is valid:
HTTP/1.1 200
{
"valid_auth": true
}
Else if authentication fails a JSON object with an error key is returned describing the issue.
GET /balance
HTTP/1.1 200
{
"balance": 17.7
}
git clone https://github.com/bencevans/oyster-api.git
cd oyster-api
npm install
npm start
MIT