2021-12-27 14:31:26 -05:00
|
|
|
from datetime import datetime, timedelta
|
2021-12-27 14:21:48 -05:00
|
|
|
|
2021-12-27 14:31:26 -05:00
|
|
|
import google_calendar
|
2021-12-27 14:21:48 -05:00
|
|
|
|
|
|
|
|
|
|
|
def main():
|
2021-12-27 14:31:26 -05:00
|
|
|
creds = google_calendar.authenticate()
|
|
|
|
service = google_calendar.get_service(creds)
|
2021-12-27 14:21:48 -05:00
|
|
|
|
2021-12-27 14:31:26 -05:00
|
|
|
google_calendar.insert_or_update_event(
|
|
|
|
service,
|
|
|
|
"octoprint_test_event",
|
|
|
|
"Test!",
|
|
|
|
datetime.utcnow(),
|
|
|
|
datetime.utcnow() + timedelta(hours=1),
|
|
|
|
)
|
2021-12-27 14:21:48 -05:00
|
|
|
|
|
|
|
|
2021-12-27 14:31:26 -05:00
|
|
|
if __name__ == "__main__":
|
2021-12-27 14:21:48 -05:00
|
|
|
main()
|