Rezepte 1.7.0: Print a recipe, or a whole cookbook
Skip to Content
ReferenceMeal plans

Meal plans

Meal plans: recipes and free texts on days of a week or on the tray, shared like lists, put on a shopping list and kept in step with it, the staples a plan's people always have, a Server-Sent Events stream of each plan's changes, and the calendar feed. A session, or an API token with plan:read to read and plan:write to change (putting a plan on a list also needs lists:write); the calendar feed's secret is managed with a session only.

Tell whether the caller has a calendar feed

Whether the caller's feed address works and since when; the address itself is shown only once, by create-calendar-feed. Session only.

Create or replace the caller's calendar feed

A new secret address for the caller's meal plans as an iCalendar feed; the address before stops working. Session only.

Revoke the caller's calendar feed

List the caller's meal plans and invitations

Create a shared meal plan

Every plan of the caller's with a week of it

The plans as list-meal-plans orders them, each with the entries on the days of the range, the lists the caller can access that they and the tray are on, and how many recipe entries are on none; and the pending invitations. One request for the plans page, however many plans. Left out, the range is the current week in the server's time zone, so a client passes its own; it passes its today too, since unlisted leaves out the days before it. Each plan also says how many entries lie on a day after the range (later) and which comes first (next), so an empty week can say what comes later.

Get a meal plan for a range of days

Rename a shared meal plan

Delete a shared meal plan

Plan a recipe or a free text

Move an entry or change its servings

Remove an entry, restorable for a day

Bring back a removed entry

Follow a meal plan's changes

A Server-Sent Events stream: `retry: 3000` first, then `event: changed` once as you connect and after every change to the plan, its JSON data carrying the plan's `revision` (refetch the plan to see what changed, unless the one you hold already has that revision), and a `: ping` comment every 25 seconds. The stream ends when the caller loses access to the plan or the server shuts down.

Invite a person to a plan

Remove a member or withdraw an invitation

Accept an invitation to a plan

Leave a plan or decline its invitation

Put planned recipes on a shopping list

Preview what a range puts on a list

List a plan's staples

Mark or unmark a staple