GAE backend
- Install App Engine SDK: https://cloud.google.com/appengine/downloads
- (in the
api
directory) launch the development app server:dev_appserver.py app.yaml
- Login via
/_login
or JSON API.
E.g.:
{
"id": 1234567890,
"name": "Big Salty Lager",
"created": "2015-12-30T04:31:42.964626+00:00",
"updated": "2015-12-30T04:31:42.964626+00:00",
"capacity": 314.15,
"consumed": 32,
"unit": "oz"
}
id
unique integer id for the Keg, read-only.
name
string, read/write.
created
timestamp when the Keg was created, read-only.
updated
timestamp when the Keg was last updated, read-only.
capacity
float capacity of the Keg, read/write.
consumed
float amout consumed of the Keg, read/write.
unit
string, read/write. Options: oz
, ml
, l
brewerydb_id
ID of the beer on brewerydb.com, read/write.
style
string, read/write.
description
string, read/write.
ibu
integer Internatonal Bitterness Unit, read/write.
abv
float Alcohol by Volume, read/write.
glass
string glass description, read/write.
image
string URL of image asset, read/write.
GET /api/v1/kegs
Returns a array of Keg objects or empty array if no kegs exist.
POST /api/v1/kegs
Keg object without id
, created
, or updated
properties.
Example:
{
"name": "New Brewski",
"capacity": 123.456
"unit": "l"
}
PUT /api/v1/kegs/:keg_id
Example: Update the Keg's consumed
to 48:
{
"consumed": 48
}
GET /api/v1/kegs/:keg_id
Should return a Keg object.
DELETE /api/v1/kegs/:keg_id
Should delete the Keg and return an empty object.