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

[FR] Add Google Calendar API integration #32

Open
makisukurisu opened this issue Sep 21, 2023 · 3 comments
Open

[FR] Add Google Calendar API integration #32

makisukurisu opened this issue Sep 21, 2023 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@makisukurisu
Copy link
Collaborator

makisukurisu commented Sep 21, 2023

Add integration with Google Calendar API. As an example, make it possible to add a weekly schedule to the calendar.

I think that you can add an additional button to the message /schedule

Monday
Tuesday
Wednesday
Thursday
Friday
Add schedule to calendar

It is call function that will generate url and redirect user to web page with google auth and add calendar, or generate link for add to calendar

Originally posted by @hikionori in #31 (comment)

@makisukurisu makisukurisu self-assigned this Sep 24, 2023
@makisukurisu makisukurisu moved this to Todo in ONTU-Bot Sep 24, 2023
@makisukurisu makisukurisu added the enhancement New feature or request label Sep 24, 2023
@makisukurisu makisukurisu moved this from Todo to In Progress in ONTU-Bot Jun 20, 2024
@makisukurisu
Copy link
Collaborator Author

# https://calendar.google.com/calendar/render?action=TEMPLATE&text=Example+Google+Calendar+Event&details=More+help+see:+https://support.google.com/calendar/thread/81344786&dates=20201231T160000/20201231T170000&recur=RRULE:FREQ%3DWEEKLY

import urllib.parse

base_url = "https://calendar.google.com/calendar/render"

params = {
    "action": "TEMPLATE",
    "text": "Ababagalamaga",
    "details": "Перейдіть https://google.com/test для отримання додаткової інформації.",
    "dates": "20240620T155200/20240620T155300",  # YYYYMMDDTHHMMSS/YYYYMMDDTHHMMSS,
    "ctz": "Europe/Kiev",
}

final_url = base_url + "?" + urllib.parse.urlencode(params)

print(final_url)

This seems to work. Though, adding whole schedule will be tricky most likely.

@makisukurisu
Copy link
Collaborator Author

Hi, @hikionori, Since that was your request initially, I'd like to hear your opinion first.

I see two ways of solving this issue:

  • Adding pairs manually (i.e - open day 1, pair 1, hit "Add to calendar", add to calendar in a browser window, go to second pair...)
  • Creating a small web-app that would allow to add all the pairs of a week with a simple authorization request to Google app.

The latter is what was originally requested, and what is waaay more convenient to the end user.
But it also requires having a web-site with some UI so people can hit that button and add pairs.

I have no problems making one, but this will clearly take some time. Is it worth the effort, or is adding pairs manually good enough? Let me know.

Sorry for the wait, by the way, I've finally got some free time and energy to spend on this project.

@makisukurisu
Copy link
Collaborator Author

Well, obviously there's a third option - close this issue and pretend it never existed, if no one really needs this. Let me know anyway. Here, or in DM's in Telegram, or in a channel/group:
https://t.me/ontu_schedule_bot_channel

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

When branches are created from issues, their pull requests are automatically linked.

1 participant