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

Google: Pass eventTypes #664

Merged
merged 2 commits into from
Feb 19, 2024
Merged

Google: Pass eventTypes #664

merged 2 commits into from
Feb 19, 2024

Conversation

squeaky-pl
Copy link
Contributor

@squeaky-pl squeaky-pl commented Feb 8, 2024

Google will soon start returning other event types in their APIs that we don't care about. This change ensures that everything keeps working as before.

https://developers.google.com/calendar/api/v3/reference/events/list

eventTypes 	string 	Event types to return. Optional. This parameter can be repeated multiple times to return events of different types. The default is ["default", "focusTime", "outOfOffice"].

Acceptable values are:

    "default": Regular events.
    "focusTime": Focus time events.
    "outOfOffice": Out of office events.
    "workingLocation": Working location events.

image

@squeaky-pl
Copy link
Contributor Author

Tested this manually in production on the pod where my email/calendar is running and all is good.

Comment on lines 135 to 137
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)
Copy link
Member

@wojcikstefan wojcikstefan Feb 8, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why the use of kwargs? Is it because the linter would complain about passing eventTypes="default" explicitly to the function call since it's not the typical Pythonic snake_case?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That was indeed unnecessary, I changed it.

@wojcikstefan
Copy link
Member

@squeaky-pl shall we ship it?

@squeaky-pl squeaky-pl merged commit 5b5f90a into master Feb 19, 2024
5 checks passed
@squeaky-pl squeaky-pl deleted the google-pass-event-types branch February 19, 2024 13:37
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