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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0db20c711a1bf493db4ec8326731d1f34904f6c4843b732c9ae20e5a3ba9285a
4
- data.tar.gz: cd51ae29c5446be90aa0cae028d98e655e08f35887f97b5441224716a13e0863
3
+ metadata.gz: 6be7bbdd90657f348773aa2656e7c57fc623ae62bf22f40c5826f4ac55e9133d
4
+ data.tar.gz: c9f09ea05931458f837240f75b1b07c35b64ffa86db3e1a94d138ab0779bd3e4
5
5
  SHA512:
6
- metadata.gz: 8e88af3c452fd666ea9f6296895d3c4d3f9e2a69c93a51adbff899932590e950956a6a6515cdf7af0f0961a810c9eacd9fdec5bc2bfa1eb2458d137d0eb7372c
7
- data.tar.gz: 3bab3417151644f306287591ee1e4eec3bebb0a6df9bf731e8653195ae314b10bd1c41f94ef05d5be1010f26faa6da3f07d6fda2c3a60745ef009ef052b930de
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.
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PaprikaClient
4
- VERSION = "0.2.0"
4
+ VERSION = "0.3.0"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: paprika_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Klein