Reference¶
Cookidoo API package.
Cookidoo
¶
Unofficial Cookidoo API interface.
Init function for Cookidoo API.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
session
|
ClientSession
|
The client session for aiohttp requests.
Must use a |
required |
cfg
|
CookidooConfig
|
Cookidoo config |
CookidooConfig()
|
on_auth_data_update
|
Callable[[CookidooAuthData], None] | None
|
Optional callback invoked with the new :class: |
None
|
Source code in cookidoo_api/cookidoo.py
localization
property
¶
Localization.
api_endpoint
property
¶
Get the api endpoint.
Returns the cookidoo domain derived from the localization URL,
e.g. https://cookidoo.ch or https://cookidoo.co.uk.
auth_data
property
¶
The current OAuth2 tokens, for persistence. None until logged in.
on_auth_data_update
property
writable
¶
The callback notified whenever the tokens change.
Called with the new :class:CookidooAuthData after a login and after
every refresh, including the transparent one a request performs when
the access token has expired. The server rotates the refresh token
along with the access token, so a consumer that persists the tokens
should store what the callback hands it, rather than only the result of
an explicit :meth:login.
Not called by :meth:apply_auth_data or :meth:load_token, which
restore tokens the consumer already holds.
Exceptions raised by the callback are caught and logged: a consumer failing to store the tokens must not break the request that triggered the refresh.
apply_auth_data
¶
Restore a previous login from persisted tokens (no network call).
The access token is refreshed automatically on the next request if it has expired.
Source code in cookidoo_api/cookidoo.py
login
async
¶
Perform an OAuth2 authorization-code + PKCE login.
Signs in with the configured email/password against the CIAM identity
provider, exchanges the resulting code for an access/refresh token, and
authenticates all subsequent API calls via a Bearer header:
- discover the OIDC endpoints
- open the authorize endpoint to reach the CIAM login form
- POST the credentials to the CIAM login service
- capture the
codefrom the redirect to the app scheme - exchange the code for tokens (public client, PKCE, no secret)
The login redirects still rely on the session cookie jar, so a
CookieJar(unsafe=True) session is required. The login requests carry
a browser-like User-Agent (request-scoped only) since the flow is
served behind Cloudflare.
Raises:
| Type | Description |
|---|---|
CookidooConfigException
|
If the OAuth2 client id or redirect uri was overridden with an empty value. |
CookidooRequestException
|
If the request fails. |
CookidooParseException
|
If the login page cannot be parsed. |
CookidooAuthException
|
If the login fails due to invalid credentials. |
Source code in cookidoo_api/cookidoo.py
454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 | |
refresh
async
¶
Refresh the access token using the stored refresh token.
Raises:
| Type | Description |
|---|---|
CookidooAuthException
|
If there is no refresh token or the refresh is rejected. |
CookidooConfigException
|
If the OAuth2 client id or redirect uri was overridden with an empty value. |
CookidooRequestException
|
If the discovery or token request fails or times out. |
Source code in cookidoo_api/cookidoo.py
save_token
¶
Save the OAuth2 tokens to a file for later reuse.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
str | Path
|
Path to the file where the tokens will be saved. |
required |
Source code in cookidoo_api/cookidoo.py
load_token
¶
Restore the OAuth2 tokens from a file saved with :meth:save_token.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
str | Path
|
Path to the file containing the saved tokens. |
required |
Raises:
| Type | Description |
|---|---|
CookidooConfigException
|
If the token file cannot be read or parsed. |
Source code in cookidoo_api/cookidoo.py
get_user_info
async
¶
Get user info.
Returns:
| Type | Description |
|---|---|
CookidooUserInfo
|
The user info |
Raises:
| Type | Description |
|---|---|
CookidooAuthException
|
When the access token is not valid anymore |
CookidooRequestException
|
If the request fails. |
CookidooParseException
|
If the parsing of the request response fails. |
Source code in cookidoo_api/cookidoo.py
get_active_subscription
async
¶
Get active subscription if any.
Returns:
| Type | Description |
|---|---|
CookidooSubscription
|
The active subscription |
Raises:
| Type | Description |
|---|---|
CookidooAuthException
|
When the access token is not valid anymore |
CookidooRequestException
|
If the request fails. |
CookidooParseException
|
If the parsing of the request response fails. |
Source code in cookidoo_api/cookidoo.py
get_devices
async
¶
Get the Thermomix appliances paired to the account.
Returns:
| Type | Description |
|---|---|
list[CookidooDevice]
|
The paired appliances, identified by machine type (e.g. |
Raises:
| Type | Description |
|---|---|
CookidooAuthException
|
When the access token is not valid anymore |
CookidooRequestException
|
If the request fails. |
CookidooParseException
|
If the parsing of the request response fails. |
Source code in cookidoo_api/cookidoo.py
get_monitored_device_ids
async
¶
Get the appliance IDs currently available for remote monitoring.
Note this is distinct from :meth:get_devices (all paired appliances):
an appliance only appears here while it is online/reachable for
monitoring, and the identifier is the opaque remote-monitoring device id.
Returns:
| Type | Description |
|---|---|
list[str]
|
The remote-monitoring device ids (empty when none are available). |
Raises:
| Type | Description |
|---|---|
CookidooAuthException
|
When the access token is not valid anymore |
CookidooRequestException
|
If the request fails. |
CookidooParseException
|
If the parsing of the request response fails. |
Source code in cookidoo_api/cookidoo.py
register_push_token
async
¶
Register a push token to receive remote-monitoring cook-state updates.
Appliance state is delivered as a Firebase Cloud Messaging data message
to the registered token; obtaining the token and receiving the messages
is the caller's responsibility. Decode received payloads with
:func:cookidoo_api.cooking_activity_from_push.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
push_token
|
str
|
The FCM registration token to deliver updates to. |
required |
mobile_app_id
|
str
|
A stable per-installation identifier for this client. |
required |
Raises:
| Type | Description |
|---|---|
CookidooAuthException
|
When the access token is not valid anymore |
CookidooRequestException
|
If the request fails. |
CookidooParseException
|
If the parsing of the request response fails. |
Source code in cookidoo_api/cookidoo.py
unregister_push_token
async
¶
Unregister a previously registered push token.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
push_token
|
str
|
The FCM registration token to stop delivering updates to. |
required |
Raises:
| Type | Description |
|---|---|
CookidooAuthException
|
When the access token is not valid anymore |
CookidooRequestException
|
If the request fails. |
CookidooParseException
|
If the parsing of the request response fails. |
Source code in cookidoo_api/cookidoo.py
get_recipe_details
async
¶
Get recipe details.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id
|
str
|
The id of the recipe |
required |
Returns:
| Type | Description |
|---|---|
CookidooShoppingRecipeDetails
|
The recipe details |
Raises:
| Type | Description |
|---|---|
CookidooAuthException
|
When the access token is not valid anymore |
CookidooRequestException
|
If the request fails. |
CookidooParseException
|
If the parsing of the request response fails. |
Source code in cookidoo_api/cookidoo.py
search_recipes
async
¶
Search recipes in Cookidoo (GET).
Uses the same API base as the rest of the client (api_endpoint): {api_endpoint}/search/{locale}
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
query
|
str | None
|
Optional search query (e.g. "chicken", "pasta"). |
None
|
locale
|
str | None
|
Locale for the search path (e.g. "es", "en", "de"). Defaults to the first part of the configured language (e.g. "de-CH" -> "de"). |
None
|
accessories
|
str | list[str] | None
|
Optional comma-separated accessory filters (e.g. "includingFriend,includingBladeCover,includingBladeCoverWithPeeler,includingCutter,includingSensor"). |
None
|
languages
|
str | list[str] | None
|
Optional comma-separated language codes (e.g. "en,es"). |
None
|
categories
|
str | list[str] | None
|
Optional comma-separated category IDs. |
None
|
countries
|
str | list[str] | None
|
Optional comma-separated country codes (e.g. "ar"). |
None
|
ingredients
|
str | list[str] | None
|
Optional comma-separated ingredients. |
None
|
exclude_ingredients
|
str | list[str] | None
|
Optional comma-separated excluded ingredients. |
None
|
tags
|
str | list[str] | None
|
Optional comma-separated tags. |
None
|
ratings
|
str | list[str] | None
|
Optional comma-separated ratings (e.g. "5,4"). |
None
|
difficulty
|
str | None
|
Optional difficulty (e.g. "easy", "medium", "hard"). |
None
|
preparation_time
|
int | None
|
Optional preparation time in seconds. |
None
|
total_time
|
int | None
|
Optional total time in seconds. |
None
|
portions
|
int | None
|
Optional portions count. |
None
|
page
|
int | None
|
Optional page number (API-dependent, often 0- or 1-based). |
None
|
page_size
|
int | None
|
Optional page size (API-dependent; common keys: pageSize). |
None
|
tmv
|
ThermomixMachineType | str | list[ThermomixMachineType | str] | None
|
Optional Thermomix machine version. Use |
None
|
Returns:
| Type | Description |
|---|---|
CookidooSearchResult
|
Search result with recipes and total count. |
Raises:
| Type | Description |
|---|---|
CookidooAuthException
|
When the access token is not valid anymore. |
CookidooRequestException
|
If the request fails. |
CookidooParseException
|
If the parsing of the request response fails. |
Source code in cookidoo_api/cookidoo.py
1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 | |
get_custom_recipe
async
¶
Get custom recipe.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id
|
str
|
The id of the custom recipe |
required |
Returns:
| Type | Description |
|---|---|
CookidooCustomRecipe
|
The custom recipe |
Raises:
| Type | Description |
|---|---|
CookidooAuthException
|
When the access token is not valid anymore |
CookidooRequestException
|
If the request fails. |
CookidooParseException
|
If the parsing of the request response fails. |
Source code in cookidoo_api/cookidoo.py
list_custom_recipes
async
¶
List custom recipes.
Source code in cookidoo_api/cookidoo.py
add_custom_recipe_from
async
¶
Add custom recipe.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
recipeId
|
str
|
The base recipe to copy |
required |
servingSize
|
int
|
The serving size of the custom recipe |
required |
Returns:
| Type | Description |
|---|---|
CookidooCustomRecipe
|
The added custom recipe |
Raises:
| Type | Description |
|---|---|
CookidooAuthException
|
When the access token is not valid anymore |
CookidooRequestException
|
If the request fails. |
CookidooParseException
|
If the parsing of the request response fails. |
Source code in cookidoo_api/cookidoo.py
remove_custom_recipe
async
¶
Remove custom recipe.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
custom_recipe_id
|
str
|
The custom recipe id to remove |
required |
Raises:
| Type | Description |
|---|---|
CookidooAuthException
|
When the access token is not valid anymore |
CookidooRequestException
|
If the request fails. |
CookidooParseException
|
If the parsing of the request response fails. |
Source code in cookidoo_api/cookidoo.py
get_shopping_list_recipes
async
¶
Get recipes.
Returns:
| Type | Description |
|---|---|
list[CookidooShoppingRecipe]
|
The list of the recipes |
Raises:
| Type | Description |
|---|---|
CookidooAuthException
|
When the access token is not valid anymore |
CookidooRequestException
|
If the request fails. |
CookidooParseException
|
If the parsing of the request response fails. |
Source code in cookidoo_api/cookidoo.py
get_ingredient_items
async
¶
Get ingredient items.
Returns:
| Type | Description |
|---|---|
list[CookidooIngredientItem]
|
The list of the ingredient items |
Raises:
| Type | Description |
|---|---|
CookidooAuthException
|
When the access token is not valid anymore |
CookidooRequestException
|
If the request fails. |
CookidooParseException
|
If the parsing of the request response fails. |
Source code in cookidoo_api/cookidoo.py
add_ingredient_items_for_recipes
async
¶
Add ingredient items for recipes.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
recipe_ids
|
list[str]
|
The recipe ids for the ingredient items to add to the shopping list |
required |
Returns:
| Type | Description |
|---|---|
list[CookidooIngredientItem]
|
The list of the added ingredient items |
Raises:
| Type | Description |
|---|---|
CookidooAuthException
|
When the access token is not valid anymore |
CookidooRequestException
|
If the request fails. |
CookidooParseException
|
If the parsing of the request response fails. |
Source code in cookidoo_api/cookidoo.py
remove_ingredient_items_for_recipes
async
¶
Remove ingredient items for recipes.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
recipe_ids
|
list[str]
|
The recipe ids for the ingredient items to remove to the shopping list |
required |
Raises:
| Type | Description |
|---|---|
CookidooAuthException
|
When the access token is not valid anymore |
CookidooRequestException
|
If the request fails. |
CookidooParseException
|
If the parsing of the request response fails. |
Source code in cookidoo_api/cookidoo.py
edit_ingredient_items_ownership
async
¶
Edit ownership ingredient items.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
ingredient_items
|
list[CookidooIngredientItem]
|
The ingredient items to change the the |
required |
Returns:
| Type | Description |
|---|---|
list[CookidooIngredientItem]
|
The list of the edited ingredient items |
Raises:
| Type | Description |
|---|---|
CookidooAuthException
|
When the access token is not valid anymore |
CookidooRequestException
|
If the request fails. |
CookidooParseException
|
If the parsing of the request response fails. |
Source code in cookidoo_api/cookidoo.py
add_ingredient_items_for_custom_recipes
async
¶
Add ingredient items for custom recipes.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
recipe_ids
|
list[str]
|
The recipe ids for the ingredient items to add to the shopping list |
required |
Returns:
| Type | Description |
|---|---|
list[CookidooIngredientItem]
|
The list of the added ingredient items |
Raises:
| Type | Description |
|---|---|
CookidooAuthException
|
When the access token is not valid anymore |
CookidooRequestException
|
If the request fails. |
CookidooParseException
|
If the parsing of the request response fails. |
Source code in cookidoo_api/cookidoo.py
remove_ingredient_items_for_custom_recipes
async
¶
Remove ingredient items for custom recipes.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
recipe_ids
|
list[str]
|
The custom recipe ids for the ingredient items to remove to the shopping list |
required |
Raises:
| Type | Description |
|---|---|
CookidooAuthException
|
When the access token is not valid anymore |
CookidooRequestException
|
If the request fails. |
CookidooParseException
|
If the parsing of the request response fails. |
Source code in cookidoo_api/cookidoo.py
get_additional_items
async
¶
Get additional items.
Returns:
| Type | Description |
|---|---|
list[CookidooAdditionalItem]
|
The list of the additional items |
Raises:
| Type | Description |
|---|---|
CookidooAuthException
|
When the access token is not valid anymore |
CookidooRequestException
|
If the request fails. |
CookidooParseException
|
If the parsing of the request response fails. |
Source code in cookidoo_api/cookidoo.py
add_additional_items
async
¶
Create additional items.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
additional_item_names
|
list[str]
|
The additional item names to create, only the label can be set, as the default state |
required |
Returns:
| Type | Description |
|---|---|
list[CookidooAdditionalItem]
|
The list of the added additional items |
Raises:
| Type | Description |
|---|---|
CookidooAuthException
|
When the access token is not valid anymore |
CookidooRequestException
|
If the request fails. |
CookidooParseException
|
If the parsing of the request response fails. |
Source code in cookidoo_api/cookidoo.py
edit_additional_items
async
¶
Edit additional items.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
additional_items
|
list[CookidooAdditionalItem]
|
The additional items to change the the |
required |
Returns:
| Type | Description |
|---|---|
list[CookidooAdditionalItem]
|
The list of the edited additional items |
Raises:
| Type | Description |
|---|---|
CookidooAuthException
|
When the access token is not valid anymore |
CookidooRequestException
|
If the request fails. |
CookidooParseException
|
If the parsing of the request response fails. |
Source code in cookidoo_api/cookidoo.py
edit_additional_items_ownership
async
¶
Edit ownership additional items.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
additional_items
|
list[CookidooAdditionalItem]
|
The additional items to change the the |
required |
Returns:
| Type | Description |
|---|---|
list[CookidooAdditionalItem]
|
The list of the edited additional items |
Raises:
| Type | Description |
|---|---|
CookidooAuthException
|
When the access token is not valid anymore |
CookidooRequestException
|
If the request fails. |
CookidooParseException
|
If the parsing of the request response fails. |
Source code in cookidoo_api/cookidoo.py
remove_additional_items
async
¶
Remove additional items.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
additional_item_ids
|
list[str]
|
The additional item ids to remove |
required |
Raises:
| Type | Description |
|---|---|
CookidooAuthException
|
When the access token is not valid anymore |
CookidooRequestException
|
If the request fails. |
CookidooParseException
|
If the parsing of the request response fails. |
Source code in cookidoo_api/cookidoo.py
clear_shopping_list
async
¶
Remove all additional items, ingredients and recipes.
Raises:
| Type | Description |
|---|---|
CookidooAuthException
|
When the access token is not valid anymore |
CookidooRequestException
|
If the request fails. |
CookidooParseException
|
If the parsing of the request response fails. |
Source code in cookidoo_api/cookidoo.py
count_managed_collections
async
¶
Get managed collections.
Returns:
| Type | Description |
|---|---|
tuple[int, int]
|
The number of managed collections and the number of pages |
Raises:
| Type | Description |
|---|---|
CookidooAuthException
|
When the access token is not valid anymore |
CookidooRequestException
|
If the request fails. |
CookidooParseException
|
If the parsing of the request response fails. |
Source code in cookidoo_api/cookidoo.py
get_managed_collections
async
¶
Get managed collections.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
page
|
int
|
The page of the managed collections |
0
|
Returns:
| Type | Description |
|---|---|
list[CookidooCollection]
|
The list of the managed collections |
Raises:
| Type | Description |
|---|---|
CookidooAuthException
|
When the access token is not valid anymore |
CookidooRequestException
|
If the request fails. |
CookidooParseException
|
If the parsing of the request response fails. |
Source code in cookidoo_api/cookidoo.py
add_managed_collection
async
¶
Add managed collections.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
managed_collection_id
|
str
|
The managed collection id to add |
required |
Returns:
| Type | Description |
|---|---|
CookidooCollection
|
The added managed collection |
Raises:
| Type | Description |
|---|---|
CookidooAuthException
|
When the access token is not valid anymore |
CookidooRequestException
|
If the request fails. |
CookidooParseException
|
If the parsing of the request response fails. |
Source code in cookidoo_api/cookidoo.py
remove_managed_collection
async
¶
Remove managed collection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
managed_collection_id
|
str
|
The managed collection id to remove |
required |
Raises:
| Type | Description |
|---|---|
CookidooAuthException
|
When the access token is not valid anymore |
CookidooRequestException
|
If the request fails. |
CookidooParseException
|
If the parsing of the request response fails. |
Source code in cookidoo_api/cookidoo.py
count_custom_collections
async
¶
Get custom collections.
Returns:
| Type | Description |
|---|---|
tuple[int, int]
|
The number of custom collections and the number of pages |
Raises:
| Type | Description |
|---|---|
CookidooAuthException
|
When the access token is not valid anymore |
CookidooRequestException
|
If the request fails. |
CookidooParseException
|
If the parsing of the request response fails. |
Source code in cookidoo_api/cookidoo.py
get_custom_collections
async
¶
Get custom collections.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
page
|
int
|
The page of the custom collections |
0
|
Returns:
| Type | Description |
|---|---|
list[CookidooCollection]
|
The list of the custom collections |
Raises:
| Type | Description |
|---|---|
CookidooAuthException
|
When the access token is not valid anymore |
CookidooRequestException
|
If the request fails. |
CookidooParseException
|
If the parsing of the request response fails. |
Source code in cookidoo_api/cookidoo.py
add_custom_collection
async
¶
Add custom collections.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
custom_collection_name
|
str
|
The custom collection name to add |
required |
Returns:
| Type | Description |
|---|---|
CookidooCollection
|
The added custom collection |
Raises:
| Type | Description |
|---|---|
CookidooAuthException
|
When the access token is not valid anymore |
CookidooRequestException
|
If the request fails. |
CookidooParseException
|
If the parsing of the request response fails. |
Source code in cookidoo_api/cookidoo.py
remove_custom_collection
async
¶
Remove custom collection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
custom_collection_id
|
str
|
The custom collection id to remove |
required |
Raises:
| Type | Description |
|---|---|
CookidooAuthException
|
When the access token is not valid anymore |
CookidooRequestException
|
If the request fails. |
CookidooParseException
|
If the parsing of the request response fails. |
Source code in cookidoo_api/cookidoo.py
add_recipes_to_custom_collection
async
¶
Add recipes to a custom collections.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
custom_collection_id
|
str
|
The custom collection to add the recipes to |
required |
recipe_ids
|
list[str]
|
The recipe ids to add to a custom collection |
required |
Returns:
| Type | Description |
|---|---|
CookidooCollection
|
The changed custom collection |
Raises:
| Type | Description |
|---|---|
CookidooAuthException
|
When the access token is not valid anymore |
CookidooRequestException
|
If the request fails. |
CookidooParseException
|
If the parsing of the request response fails. |
Source code in cookidoo_api/cookidoo.py
remove_recipe_from_custom_collection
async
¶
Remove recipe from a custom collections.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
custom_collection_id
|
str
|
The custom collection to remove the recipe from |
required |
recipe_id
|
str
|
The recipe id to remove from a custom collection |
required |
Returns:
| Type | Description |
|---|---|
CookidooCollection
|
The changed custom collection |
Raises:
| Type | Description |
|---|---|
CookidooAuthException
|
When the access token is not valid anymore |
CookidooRequestException
|
If the request fails. |
CookidooParseException
|
If the parsing of the request response fails. |
Source code in cookidoo_api/cookidoo.py
get_recipes_in_calendar_week
async
¶
Get recipes in a calendar week.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
day
|
date
|
The date specifying the calendar week |
required |
Returns:
| Type | Description |
|---|---|
list[CookidooCalendarDay]
|
The list of the calendar days with recipes |
Raises:
| Type | Description |
|---|---|
CookidooAuthException
|
When the access token is not valid anymore |
CookidooRequestException
|
If the request fails. |
CookidooParseException
|
If the parsing of the request response fails. |
Source code in cookidoo_api/cookidoo.py
add_recipes_to_calendar
async
¶
Add recipes to a calendar.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
day
|
date
|
The date to add the recipes to in the calendar |
required |
recipe_ids
|
list[str]
|
The recipe ids to add to the calendar |
required |
Returns:
| Type | Description |
|---|---|
CookidooCalendarDay
|
The changed calendar day |
Raises:
| Type | Description |
|---|---|
CookidooAuthException
|
When the access token is not valid anymore |
CookidooRequestException
|
If the request fails. |
CookidooParseException
|
If the parsing of the request response fails. |
Source code in cookidoo_api/cookidoo.py
remove_recipe_from_calendar
async
¶
Remove recipe from calendar.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
day
|
date
|
The date to remove the recipe from in the calendar |
required |
recipe_id
|
str
|
The recipe id to remove from the calendar |
required |
Returns:
| Type | Description |
|---|---|
CookidooCalendarDay
|
The changed calendar day |
Raises:
| Type | Description |
|---|---|
CookidooAuthException
|
When the access token is not valid anymore |
CookidooRequestException
|
If the request fails. |
CookidooParseException
|
If the parsing of the request response fails. |
Source code in cookidoo_api/cookidoo.py
add_custom_recipes_to_calendar
async
¶
Add custom recipes to a calendar.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
day
|
date
|
The date to add the custom recipes to in the calendar |
required |
recipe_ids
|
list[str]
|
The recipe ids to add to the calendar |
required |
Returns:
| Type | Description |
|---|---|
CookidooCalendarDay
|
The changed calendar day |
Raises:
| Type | Description |
|---|---|
CookidooAuthException
|
When the access token is not valid anymore |
CookidooRequestException
|
If the request fails. |
CookidooParseException
|
If the parsing of the request response fails. |
Source code in cookidoo_api/cookidoo.py
remove_custom_recipe_from_calendar
async
¶
Remove custom recipe from calendar.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
day
|
date
|
The date to remove the custom recipe from in the calendar |
required |
recipe_id
|
str
|
The custom recipe id to remove from the calendar |
required |
Returns:
| Type | Description |
|---|---|
CookidooCalendarDay
|
The changed calendar day |
Raises:
| Type | Description |
|---|---|
CookidooAuthException
|
When the access token is not valid anymore |
CookidooRequestException
|
If the request fails. |
CookidooParseException
|
If the parsing of the request response fails. |
Source code in cookidoo_api/cookidoo.py
CookidooAuthException
¶
Bases: CookidooException
When an authentication error is encountered.
CookidooConfigException
¶
Bases: CookidooException
When the config is invalid.
CookidooParseException
¶
Bases: CookidooException
When data could not be parsed.
CookidooRequestException
¶
Bases: CookidooException
When a request returns an error.
CookidooResponseException
¶
Bases: CookidooException
When a response could not be parsed.
CookidooUnavailableException
¶
Bases: CookidooException
When the network or server is not available.
CookidooAdditionalItem
dataclass
¶
CookidooAuthData
dataclass
¶
OAuth2 tokens obtained from a login, for persistence and restore.
expires_at is a POSIX timestamp (seconds) for the access token.
CookidooCategory
dataclass
¶
CookidooChapter
dataclass
¶
Cookidoo chapter type.
Attributes:
| Name | Type | Description |
|---|---|---|
title |
The title of the chapter |
|
recipes |
list[CookidooChapterRecipe]
|
The recipes in the chapter |
CookidooChapterRecipe
dataclass
¶
CookidooCollection
dataclass
¶
Cookidoo collection type.
Attributes:
| Name | Type | Description |
|---|---|---|
id |
str
|
The id of the collection |
title |
The title of the collection |
|
description |
str | None
|
The description of the collection |
chapters |
list[CookidooChapter]
|
The recipes in the collection |
CookidooConfig
dataclass
¶
Cookidoo config type.
Attributes:
| Name | Type | Description |
|---|---|---|
localization |
CookidooLocalizationConfig
|
The localization for the api including country, language and url |
email |
str
|
The email to login |
password |
str
|
The password to login |
client_id |
str
|
The OAuth2 client id to run the login flow as |
redirect_uri |
str
|
The OAuth2 redirect uri registered for |
The login runs as a public client (authorization code + PKCE, no client |
|
|
secret), so both values are public identifiers rather than credentials and |
|
|
they default to the ones of the Cookidoo mobile app. Callers do not need to |
|
|
set them; see ``docs/oauth-client.md``. |
|
CookidooCookingActivity
dataclass
¶
Live cook state pushed by an appliance's remote monitoring.
Values the recipe does not provide are None (the app renders "---"
for an unset current temperature, which is normalised to None here).
is_active
property
¶
Whether a cook is currently running or paused.
CookidooDevice
dataclass
¶
A paired Thermomix appliance on the account.
CookidooIngredient
dataclass
¶
CookidooIngredientItem
dataclass
¶
Bases: CookidooItem
Cookidoo ingredient item type.
Attributes:
| Name | Type | Description |
|---|---|---|
description |
str
|
The description of the item, including the quantity or other helpful information |
CookidooItem
dataclass
¶
CookidooLocalizationConfig
dataclass
¶
A localization config class.
CookidooRecipeCollection
dataclass
¶
CookidooSearchRecipeHit
dataclass
¶
CookidooSearchResult
dataclass
¶
Cookidoo search result type.
Attributes:
| Name | Type | Description |
|---|---|---|
recipes |
list[CookidooSearchRecipeHit]
|
List of recipe hits matching the search |
total |
int
|
Total number of matching recipes |
CookidooShoppingRecipe
dataclass
¶
Cookidoo shopping recipe type.
Attributes:
| Name | Type | Description |
|---|---|---|
id |
str
|
The id of the recipe |
name |
str
|
The label of the recipe |
ingredients |
list[CookidooIngredient]
|
The ingredients of the recipe |
thumbnail |
str | None
|
The thumbnail image URL (small preview) |
image |
str | None
|
The full-size image URL |
url |
str
|
The URL of the recipe |
CookidooShoppingRecipeDetails
dataclass
¶
Bases: CookidooShoppingRecipe
Cookidoo recipe details type.
Attributes:
| Name | Type | Description |
|---|---|---|
difficulty |
str
|
The difficulty of the recipe |
notes |
list[str]
|
Hints and additional information about the recipe |
categories |
list[CookidooCategory]
|
The categories of the recipe |
collections |
list[CookidooRecipeCollection]
|
The collections of the recipe |
utensils |
list[str]
|
The utensils needed for the recipe |
serving_size |
int
|
The service size of the recipe |
active_time |
int
|
The time needed preparing the recipe [in seconds] |
total_time |
int
|
The time needed until the recipe is ready [in seconds] |
nutrition_groups |
list[CookidooNutritionGroup]
|
The nutrition groups of the recipe (from API, may be empty) |
step_groups |
list[CookidooRecipeStepGroup]
|
The grouped cooking instructions for the recipe (from API, may be empty). Instruction text is returned as HTML markup, as sent by the API. |
CookidooSubscription
dataclass
¶
A subscription class.
CookidooUserInfo
dataclass
¶
A user info class.
cooking_activity_from_push
¶
Convert a remote-monitoring push payload into a cooking activity.
Appliance state is delivered out of band (a Firebase Cloud Messaging data
message) rather than as an HTTP response, so consumers receive it via their
own push channel and decode it here. Both the on-the-wire field names
(leadingText/trailingText/completedDate/staleDate/…) and the
app's parsed names are accepted.
Source code in cookidoo_api/helpers.py
get_country_options
async
¶
get_language_options
async
¶
get_localization_options
async
¶
Get a list of possible localization options.