mirror of
https://github.com/grocy/grocy.git
synced 2026-04-06 04:46:16 +02:00
Kroger grocery stores allow manual access to past purchases in json form through a browser's developer tools. This class converts the Kroger json data into something Grocy can understand while doing minor error checking. Also added appropriate unit tests. In order to get this json, open developer tools and navigate to https://www.qfc.com/mypurchases (or another Kroger grocer, aka https://www.fredmeyer.com/mypurchases) and look for a call to /mypurchases/api/v1/receipt/details. The entire response will contain all recent purchases.
18 lines
427 B
JSON
18 lines
427 B
JSON
[{
|
|
"name": "Twix Minis Size Chocolate Cookie Bars",
|
|
"location_id": 2,
|
|
"qu_id_purchase": 3,
|
|
"qu_id_stock": 3,
|
|
"barcode": "0040000525509",
|
|
"quantity": 1,
|
|
"transaction_date": "2020-03-21"
|
|
}, {
|
|
"name": "Franz Extra Crisp English Muffins",
|
|
"location_id": 2,
|
|
"qu_id_purchase": 3,
|
|
"qu_id_stock": 3,
|
|
"barcode": "0072220005165",
|
|
"quantity": 3,
|
|
"transaction_date": "2020-03-21"
|
|
}
|
|
] |