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
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions spond/spond.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,7 @@ async def get_events(
group_id: str | None = None,
subgroup_id: str | None = None,
include_scheduled: bool = False,
include_hidden: bool = False,
max_end: datetime | None = None,
min_end: datetime | None = None,
max_start: datetime | None = None,
Expand All @@ -256,6 +257,10 @@ async def get_events(
(TO DO: probably events for which invites haven't been sent yet?)
Defaults to False for performance reasons.
Uses `scheduled` API parameter.
include_hidden : bool, optional
Include hidden events.
Uses `includeHidden` API parameter.
'includeHidden' filter is only available inside a group
max_end : datetime, optional
Only include events which end before or at this datetime.
Uses `maxEndTimestamp` API parameter; relates to `endTimestamp` event
Expand Down Expand Up @@ -301,6 +306,8 @@ async def get_events(
params["groupId"] = group_id
if subgroup_id:
params["subgroupId"] = subgroup_id
if include_hidden and group_id:
params["includeHidden"] = "true"

async with self.clientsession.get(
url, headers=self.auth_headers, params=params
Expand Down