Skip to content

Commit 42d4fab

Browse files
committed
Added recipe syncing with the meal sittings
1 parent f778427 commit 42d4fab

File tree

7 files changed

+692
-352
lines changed

7 files changed

+692
-352
lines changed

API_REFERENCE.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1067,6 +1067,8 @@ Content-Type: application/json
10671067
- Validated on March 7, 2026: successfully created and read back 25 separate dinner sittings for the same date.
10681068
- Practical limit was **not** reached at 25 entries.
10691069
- Immediate `POST /meals/sittings` response may show `attributes.instances: []`; follow-up `GET` calls return the expected date in `instances`.
1070+
- When `meal_recipe_id` is provided, `summary` must be blank (`null`); providing a non-blank summary returns `422` with `{"errors":{"summary":["must be blank"]}}`.
1071+
- `POST /meals/sittings` may return `data` as an array even for a single created sitting.
10701072

10711073
#### Get Meal Sitting Instances (Single Sitting)
10721074
**Request:**
@@ -1130,6 +1132,8 @@ No `PUT /frames/{frameId}/meals/sittings/{sittingId}` calls were captured in `ou
11301132
9. **Sitting Instance Deletion**: Observed delete path is `DELETE /meals/sittings/{sittingId}/instances/{date}` (not base `/meals/sittings/{sittingId}`)
11311133
10. **Multiple Sittings Per Day**: Observed that at least 25 distinct sittings can exist for the same date and meal category (e.g., dinner) without API rejection
11321134
11. **Create Response Timing**: Newly created sittings may return `instances: []` in immediate POST response, but subsequent GET endpoints return the correct date instances
1135+
12. **Recipe-Linked Sitting Validation**: If `meal_recipe_id` is set, `summary` must be blank (`null`) or the API returns `422` (`summary must be blank`)
1136+
13. **Create Response Shape Variance**: `POST /meals/sittings` can return `data` as a list for single-item create responses
11331137

11341138
### Common Patterns
11351139
- Both APIs use bearer token authentication

README.md

Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ Whisk automatically syncs your grocery lists and meal plans between Paprika Reci
1515
### 🍽️ Meal Plan Sync
1616
- **One-way sync** from Paprika meal plans to Skylight calendar
1717
- **Multiple meal types** - breakfast, lunch, dinner, and snacks
18-
- **Intelligent combination** - multiple meals of same type combine automatically
19-
- Example: "Grilled Salmon + Caesar Salad + Bread" for multiple dinner items
20-
- **Recipe integration** - syncs both recipe-based and text-only meals
18+
- **Per-meal fidelity** - each Paprika meal becomes its own Skylight sitting
19+
- Multiple dinners on one day remain separate dinner entries
20+
- **Recipe integration** - syncs full Paprika recipe content + recipe reference for recipe-based meals
2121
- **Date range control** - configurable sync window (default: 7 days ahead)
2222

2323
## Important Notes
@@ -77,11 +77,11 @@ This lets you pair up additional lists between Paprika and Skylight.
7777
During setup, you can configure:
7878
- **Meal types to sync**: breakfast, lunch, dinner, snacks (all enabled by default)
7979
- **Sync window**: how many days ahead to sync meals (default: 7 days)
80-
- **Combination behavior**: how multiple meals of same type are handled
80+
- **Entry behavior**: one Paprika meal entry maps to one Skylight sitting
8181

82-
**Example meal combinations:**
83-
- Multiple breakfasts: "Oatmeal + Toast + Coffee"
84-
- Multiple dinners: "Salmon + Vegetables + Salad"
82+
**Examples:**
83+
- Multiple breakfasts in Paprika become multiple breakfast sittings in Skylight
84+
- Recipe meals in Paprika include synced recipe reference + full recipe body in Skylight recipe
8585

8686
## How It Works
8787

@@ -95,17 +95,17 @@ Check "Bread" ← minute ← Check "Bread"
9595
### Meal Plan Sync (Paprika → Skylight)
9696
```
9797
📱 Paprika Meal Plan 📺 Skylight Calendar
98-
Feb 15 Breakfast: Oatmeal → Feb 15 Breakfast: "Oatmeal + Toast"
99-
Feb 15 Breakfast: Toast
100-
Feb 15 Dinner: Salmon → Feb 15 Dinner: "Salmon + Salad"
101-
Feb 15 Dinner: Salad
98+
Feb 15 Breakfast: Oatmeal → Feb 15 Breakfast: Oatmeal
99+
Feb 15 Breakfast: Toast → Feb 15 Breakfast: Toast
100+
Feb 15 Dinner: Salmon → Feb 15 Dinner: Salmon
101+
Feb 15 Dinner: Salad → Feb 15 Dinner: Salad
102102
```
103103

104-
**Smart Combination Logic:**
105-
- Multiple meals of same type + date = combined entry
106-
- Single meals = unchanged
107-
- Different types = separate entries
108-
- Preserves meal notes and recipe information
104+
**Sync Behavior:**
105+
- One Paprika meal entry = one Skylight meal sitting
106+
- Recipe-based meals sync a linked Skylight meal recipe
107+
- Full recipe content is synced from Paprika
108+
- Paprika is source of truth for recipe data
109109

110110
## Common Commands
111111

@@ -132,9 +132,8 @@ whisk upgrade # Update to latest version
132132
- Verify your Skylight frame has meal calendar functionality enabled
133133

134134
**Multiple meals not combining?**
135-
- This is expected behavior when meals have different types (breakfast vs lunch)
136-
- Multiple meals of the same type on the same day will combine automatically
137-
- Example: 2 breakfast items become "Item1 + Item2"
135+
- This is expected behavior: meals are intentionally kept as separate sittings
136+
- Multiple meals of the same type on the same day stay separate in Skylight
138137

139138
**Command not found?**
140139
- Restart your terminal after installation
@@ -161,4 +160,4 @@ That's it! Whisk runs quietly in the background keeping your grocery lists and m
161160

162161
## License
163162

164-
Licensed under the [MIT License](LICENSE).
163+
Licensed under the [MIT License](LICENSE).

0 commit comments

Comments
 (0)