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

Enhanced Online Event Boolean for TechNW Calendar #117

Open
Sean12697 opened this issue Oct 18, 2021 · 2 comments
Open

Enhanced Online Event Boolean for TechNW Calendar #117

Sean12697 opened this issue Oct 18, 2021 · 2 comments
Labels
Type: Enhancement New feature or request on existing feature

Comments

@Sean12697
Copy link
Member

An Enhancement of #105, for the TechNW Google Calendar, we can take a recurring event (based on the name being the same) and sample three instances of the event, one prior to COVID-19, one during peak lock-down (where in-person events could not legally happen) and one after, with those three events if the location remains the same, we can set the event to false for both is_online_event and is_offline_event (deriving unspecified).

@Sean12697 Sean12697 added the Type: Enhancement New feature or request on existing feature label Oct 18, 2021
@Sean12697
Copy link
Member Author

We can only really infer that an event is not in-person (is_offline_event) based on the above, a previous discussion has been had about adding a feature to contact the event organiser, which is possible through the Google Calendar API and a creator property (with an email and displayName property) can be seen, although this would actively involve the "processing" of individual's data, which is a separate conversation / issue.

@Sean12697
Copy link
Member Author

Breaking down the logic even further, for a given recurring event (of the same name), we can get historic entries from the Google Calendar by modifying the timeMin parameter of the API Call below.

this.url = `https://www.googleapis.com/calendar/v3/calendars/${ calendarId }/events?key=${ calendarKey }&maxResults=9999&singleEvents=true&orderBy=starttime&timeMin=${ this.ISODateString(new Date()) }&timeMax=${ this.ISODateString(new Date((new Date().valueOf()) + 31540000000)) }`;

With those historic events we will get two instance, one each for the following months below:

  • January 2020 (one prior to COVID-19)
  • January 2021 (one during peak lock-down (where in-person events could not legally happen))

If the location for these two events is the same as the current / up-coming events location, then for the up-coming event we will set both is_online_event and is_offline_event to false.

For this issue, we can either make two Google Calendar API calls, one for historic events and one for up-coming, or make one API with the timeMin parameter set to 1st January 2020 then filter historic events from being returned.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement New feature or request on existing feature
Projects
None yet
Development

No branches or pull requests

1 participant