Skip to content

Commit ceac21d

Browse files
authored
Added support for event_type filtering field for listing events (#364)
This PR adds support for filtering events by event type. Note that this feature is only for Google events.
1 parent 2656703 commit ceac21d

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ Unreleased
66
* Added support for adding custom headers to outgoing requests
77
* Added support for overriding various fields of outgoing requests
88
* Added support for `provider` field in code exchange response
9+
* Added support for `event_type` filtering field for listing events
910
* Added clean messages support
1011
* Added additional webhook triggers
1112
* Made event visibility optional to support iCloud events

nylas/models/events.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@
1818
SendRsvpStatus = Literal["yes", "no", "maybe"]
1919
""" Literal representing the status of an RSVP. """
2020

21+
EventType = Literal["default", "outOfOffice", "focusTime", "workingLocation"]
22+
""" Literal representing the event type to filter by. """
23+
2124

2225
@dataclass_json
2326
@dataclass
@@ -722,6 +725,8 @@ class ListEventQueryParams(ListQueryParams):
722725
This field defaults to 50. The maximum allowed value is 200.
723726
page_token (NotRequired[str]): An identifier that specifies which page of data to return.
724727
This value should be taken from a ListResponse object's next_cursor parameter.
728+
event_type (NotRequired[List[EventType]]): (Google only) Filter events by event type.
729+
You can pass the query parameter multiple times to select or exclude multiple event types.
725730
"""
726731

727732
calendar_id: str
@@ -735,6 +740,7 @@ class ListEventQueryParams(ListQueryParams):
735740
expand_recurring: NotRequired[bool]
736741
busy: NotRequired[bool]
737742
order_by: NotRequired[str]
743+
event_type: NotRequired[List[EventType]]
738744

739745

740746
class CreateEventQueryParams(TypedDict):

0 commit comments

Comments
 (0)