Add include_hidden parameter to Spond.get_events()
#165
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.
Description
This PR enhances the functionality of
Spond.get_events()
by adding a new parameter,include_hidden
, which allows fetching hidden events that are visible to users with at least admin permissions, addressing the feature request in issue #164.Note: The
include_hidden
parameter is only supported if agroup_id
is provided. If used withoutgroup_id
, the Spond API will respond with an error:Therefore, this parameter is included in the request only when both
group_id
andinclude_hidden=True
are specified. Otherwise, the method behaves as it did previously.Summary of Changes
include_hidden
to the method signature."includeHidden"
flag is added to the request parameters only if bothgroup_id
is provided andinclude_hidden
is set toTrue
. The behavior remains unchanged if these conditions are not met.Example Usage
events = await spond_client.get_events(group_id=<GROUP_ID>, include_hidden=True)