Repository navigation
Conversation
Todoist only exposes plan limits through the Sync API, so callers that need to know what the user's plan includes, such as whether it allows reminders, had to build that request themselves. Add get_user_plan_limits to both clients, returning the current plan's limits and those of the available upgrade. Every limit except plan_name is optional, because the API leaves out some documented limits, such as workspace_filters.
11 of 21 tasks
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
user_plan_limits), so there's no way to check through the SDK what a plan includes. For example, location and absolute reminders return 403PREMIUM_ONLYon the free plan, and callers can't check for that before creating the task.getPersonalProjectCapacity().What was changed
get_user_plan_limits()inTodoistAPIandTodoistAPIAsync. It posts{"sync_token": "*", "resource_types": ["user_plan_limits"]}to/syncand returns aUserPlanLimitswithcurrentandnext(Nonewhen no upgrade is available).PlanLimitsmodel with the documented user plan info fields. Everything exceptplan_nameis optional, because the API leaves out some documented limits (for example,workspace_filterswas missing for both a free and a Pro account).Release
Same request as #274: Home Assistant is on 4.0.1, and main holds the unreleased httpx2 migration. Would you consider cherry-picking this onto
release/4.0.x? It applies cleanly there and the tests pass. The only adjustment is the docstring'shttpx2.HTTPStatusError, which ishttpxon 4.0.x.