Skip to content

Commit

Permalink
Google: Pass eventTypes
Browse files Browse the repository at this point in the history
  • Loading branch information
squeaky-pl committed Feb 8, 2024
1 parent 467a7f4 commit 38521ae
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion inbox/events/google.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Provide Google Calendar events."""

import datetime
import email.utils
import json
Expand Down Expand Up @@ -131,8 +132,9 @@ def _get_raw_events(
url = "https://www.googleapis.com/calendar/v3/calendars/{}/events".format(
urllib.parse.quote(calendar_uid)
)
params = {"eventTypes": "default"}
try:
return self._get_resource_list(url, updatedMin=sync_from_time_str)
return self._get_resource_list(url, updatedMin=sync_from_time_str, **params)
except requests.exceptions.HTTPError as exc:
assert exc.response is not None
if exc.response.status_code == 410:
Expand Down Expand Up @@ -382,6 +384,7 @@ def watch_calendar(
try:
r = requests.post(
watch_url,
params={"eventTypes": "default"},
data=json.dumps(data),
headers=headers,
auth=OAuthRequestsWrapper(token),
Expand Down

0 comments on commit 38521ae

Please sign in to comment.