Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add include_hidden parameter to Spond.get_events() #165

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Yannis-G
Copy link

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 a group_id is provided. If used without group_id, the Spond API will respond with an error:

'includeHidden' filter is only available inside a group

Therefore, this parameter is included in the request only when both group_id and include_hidden=True are specified. Otherwise, the method behaves as it did previously.

Summary of Changes

  • New Parameter: Added include_hidden to the method signature.
  • Update Docstring: Tried to match the current style of the docstring.
  • API Parameter: The "includeHidden" flag is added to the request parameters only if both group_id is provided and include_hidden is set to True. 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)

@elliot-100
Copy link
Collaborator

Hi - many thanks for this. I'll have a go at testing it against live data. Might take a few weeks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants