Releases: waza-ari/python-easyverein
v1.0.1
Breaking Changes
No breaking changes
Features
✨ Support for the booking endpoint has been introduced.
Bugfixes
✏️ fix: typo in invoice item documentation
Full Changelog: v1.0.0...v1.0.1
v1.0.0
🎉 Version 1.0.0 is here! It comes with support for the EasyVerein 2.0 API and the new temporary tokens, support to manage member groups and member group associations, full type checking support and more! There are also some breaking changes. Together with the fact that we've been using this library in our own environment for more than a year now, I feel confident releasing a new major version.
Breaking Changes
💥 v1.7
is now the standard API version. If you do not specify an API version, the library now assumes v1.7
instead of v1.6
. Supported versions for now include v1.6
, v1.7
and as of this release v2.0
. v1.6
is now deprecated and will be removed in a future release.
💥 Nested functions (including CRUD functions) that relate to a parent model (for example managing the custom fields of a member using the /api/v1.7/member/{userPk}/custom-fields
endpoints do not expect the parent model identifier as additional parameter anymore, instead the parameter is moved to the parent namespace initialiser. In other words, managing custom fields of a member (not managing custom fields themselves) now works differently.
To switch to the new approach, the following changes need to be made:
# Old
ev_client.member_custom_field.get(member.id)
# You would now instead use
ev_client.member.custom_fields(member.id).get()
This applies to ev_client.member.custom_fields
and the newly introduced ev_client.member.member_groups
methods. You can read more in the respective documentation sections.
Features
✨ Support for EasyVerein API v2.0 including support for short lived tokens. A new method is introduced to obtain a new token, or you can optionally pass a callback function that the library calls when a token must be refreshed, so you can store it. More details can be found in the documentation section about how to handle token refresh.
✨ The API client now includes models for managing Member Groups, as well as member group associations (associate members to groups).
✨ Full type hinting is now available, with the introduction of proper Generics. It is known to work with Mypy and VSCode, the PyCharm linter does not fully support auto completion. I was unable to make this work, any support is much appreciated.
Bugfixes
✏️ fix: Pydantic serialization aliases are only used if by_alias is set to True
✏️ Mostly internal, but all type hints (mypy) have been fixed. This enables proper auto completion (see features). Also see refactor: introduce generic protocol to properly type CRUD methods
Fixed wrong type annotation for some optional filter fields
Full Changelog: v0.2.7...v1.0.0
v0.2.7
Note: re-published as v0.2.7 due to a temporary outage of pypi, leading to a partial upload. Versions used once (even partially) cannot be re-used.
Features
✨ Retry on EasyvereinAPITooManyRetriesException by @cod3monk
Bugfixes
✏️ Workaround: urlencode invoice.path by @cod3monk
New Contributors
- Thanks to @cod3monk for submitting these PRs!
Full Changelog: v0.2.4...v0.2.6
v0.2.5
v0.2.4
v0.2.3
v0.2.2
v0.2.1
v0.2.0
Features
✨ Add support for pagination by adding the page
parameter to get()
CRUD methods
✨ Add support for resource filtering, by adding Pydantic Filter models and extending CRUD methods to accept an additional parameter containing the filter method
Breaking Changes
🔥 Both the get()
and get_deleted()
method now return a tuple instead of a simple list of resources. The tuple contains the list of resources as before as first element and the total number of resources (without pagination applied) as second return statement.
You'll need to change usage of those methods, either by making use of the additional return value or by changing the call:
# BEFORE
members = ev.member.get()
# NEW (preferred)
members, total_count = ev.member.get()
# NEW, if return value not needed
members = ev.member.get()[0]
# Alternative, quite common but discouraged:
members, _ = ev.member.get()