paprika_client 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/README.md +16 -0
- data/lib/paprika_client/client.rb +19 -0
- data/lib/paprika_client/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6be7bbdd90657f348773aa2656e7c57fc623ae62bf22f40c5826f4ac55e9133d
|
|
4
|
+
data.tar.gz: c9f09ea05931458f837240f75b1b07c35b64ffa86db3e1a94d138ab0779bd3e4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 57910dd76137c998a58be5a4936049a8c0491d439559c855ffc31a4824bc8e0cad8b81fb2ced5eb8882fc0473ee161894234e8c3f3db4fbde190a83d9e8c7294
|
|
7
|
+
data.tar.gz: d673cb3eb898760e838b03da4fbcdfb2410c0078dea42b60625f54298ac014880c257e133523bf50ca6dd554b8c9820b879cc32f870e56a89b64ffad007e7065
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.3.0] - 2026-07-09
|
|
4
|
+
|
|
5
|
+
- Add `Client#groceries`, `Client#grocery_lists`, and `Client#grocery_aisles`
|
|
6
|
+
read endpoints. Grocery items expose a `purchased` boolean (the API does not
|
|
7
|
+
provide a purchase date).
|
|
8
|
+
|
|
3
9
|
## [0.2.0] - 2026-07-02
|
|
4
10
|
|
|
5
11
|
- Add `Client#categories` and `Client#meals` read endpoints.
|
data/README.md
CHANGED
|
@@ -52,6 +52,22 @@ hash, always recomputes the sync `hash`, uploads the gzipped payload, and (by
|
|
|
52
52
|
default) calls `notify` so your devices refresh. Pass `notify: false` to batch
|
|
53
53
|
several writes and notify once at the end.
|
|
54
54
|
|
|
55
|
+
### Categories, meals, and groceries
|
|
56
|
+
|
|
57
|
+
```ruby
|
|
58
|
+
client.categories # => [{ "uid" => "...", "name" => "Dinner" }, ...]
|
|
59
|
+
client.meals # => [{ "uid" => "...", "recipe_uid" => "...", "date" => "2026-07-02" }, ...]
|
|
60
|
+
|
|
61
|
+
client.groceries # => [{ "uid" => "...", "name" => "2 eggs", "purchased" => false,
|
|
62
|
+
# "aisle" => "Dairy", "quantity" => "2", "list_uid" => "...",
|
|
63
|
+
# "recipe" => "...", "recipe_uid" => "..." }, ...]
|
|
64
|
+
client.grocery_lists # => [{ "uid" => "...", "name" => "My Grocery List", "is_default" => true }, ...]
|
|
65
|
+
client.grocery_aisles # => [{ "uid" => "...", "name" => "Produce" }, ...]
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
Grocery items carry a `purchased` boolean but no purchase timestamp — the API
|
|
69
|
+
doesn't expose one, so track purchase dates yourself if you need them.
|
|
70
|
+
|
|
55
71
|
### Sync hashes
|
|
56
72
|
|
|
57
73
|
Paprika uses a per-recipe `hash` to detect changes during sync. The server
|
|
@@ -53,6 +53,25 @@ module PaprikaClient
|
|
|
53
53
|
get("/v1/sync/meals/")
|
|
54
54
|
end
|
|
55
55
|
|
|
56
|
+
# Every grocery item across all lists, as an array of hashes. Each item
|
|
57
|
+
# includes "name", "purchased" (boolean), "aisle", "quantity", "list_uid",
|
|
58
|
+
# "recipe"/"recipe_uid", etc. Note: the API exposes only the purchased
|
|
59
|
+
# boolean, not a purchase date.
|
|
60
|
+
def groceries
|
|
61
|
+
get("/v1/sync/groceries/")
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
# All grocery lists as an array of hashes ({ "uid" => ..., "name" => ...,
|
|
65
|
+
# "is_default" => ... }).
|
|
66
|
+
def grocery_lists
|
|
67
|
+
get("/v1/sync/grocerylists/")
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
# All grocery aisles as an array of hashes ({ "uid" => ..., "name" => ... }).
|
|
71
|
+
def grocery_aisles
|
|
72
|
+
get("/v1/sync/groceryaisles/")
|
|
73
|
+
end
|
|
74
|
+
|
|
56
75
|
# Create or update a recipe. Accepts a Recipe or a plain attributes hash.
|
|
57
76
|
# The sync hash is always recomputed before upload so other devices detect
|
|
58
77
|
# the change. Calls #notify afterwards unless notify: false.
|