List the categories recipes are browsed by
list_categoriesBrowse Ptitchef's recipe categories by family. Get valid slugs to navigate the tree without guessing links.
Instructions
List the categories Ptitchef browses its recipes by. Called without arguments it returns the families of ingredients; pass a family's slug as 'family' to list the categories it holds. Read this before building an address by hand: the site writes its slugs freely, so the same vegetable appears as 'chou-kale' on one line and as 'recette-de-petits-pois' on the next, and a slug that was guessed lands on a page the site does not hold. Each entry carries the slug to pass back and the page to open.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Entries to render, 20 by default and 200 at most. A level holding more than this says so, and 'categories_published' always states what the page listed. | |
| family | No | The slug of a family to open, taken from a previous call. Leave it out to read the families themselves, which is where the tree starts. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | The page these categories were read from. | |
| notes | Yes | ||
| family | Yes | The family that was opened, or null for the root. | |
| source | Yes | ||
| categories | Yes | ||
| family_title | Yes | The site's own heading for this level. Null when the page carries none. | |
| category_count | Yes | Entries rendered here. | |
| categories_published | Yes | Entries the page listed, before any were rendered. |