Foces a json response.
key: json
value: null | true
Limit the result set to scans that happened on or after this day. This will default to 2 weeks from today.
key: start_date
value: null | YYYY-MM-DD
Limit the result set to scans that happened on or before this day. This will default to today.
key: end_date
value: null | YYYY-MM-DD
Here is some example json output with 3 days. Only the first day has scans in it.
{
"drinks_by_day": [
[
"2012-09-21",
[
{
"datetime_cst": "2012-09-21 14:57:42 CDT-0500",
"name": "Red Bull",
"datetime_gmt_human": "2012-09-21 19:57:42",
"type_id": 1,
"scann_id": 1,
"upc": "611269991000",
"datetime_cst_human": "2012-09-21 14:57:42",
"id": 1,
"datetime": "2012-09-21 19:57:42 UTC+0000"
},
{
"datetime_cst": "2012-09-21 14:57:44 CDT-0500",
"name": "Red Bull",
"datetime_gmt_human": "2012-09-21 19:57:44",
"type_id": 1,
"scann_id": 2,
"upc": "611269991000",
"datetime_cst_human": "2012-09-21 14:57:44",
"id": 2,
"datetime": "2012-09-21 19:57:44 UTC+0000"
},
]
],
[
"2012-09-22",
[]
],
[
"2012-09-23",
[]
]
]
}
An integer ID of a consumable.
key: id
value: integer
Foces a json response.
key: json
value: null | true
Limit the result set to scans that happened on or after this day.
key: start_date
value: null | YYYY-MM-DD
Limit the result set to scans that happened on or before this day.
key: end_date
value: null | YYYY-MM-DD
Creating Database
from beverages import db
db.create_all()
Clear Database
from beverages import db
db.drop_all()