OctoprintReservations/main.py

21 lines
403 B
Python
Raw Normal View History

from datetime import datetime, timedelta
import google_calendar
def main():
creds = google_calendar.authenticate()
service = google_calendar.get_service(creds)
google_calendar.insert_or_update_event(
service,
"octoprint_test_event",
"Test!",
datetime.utcnow(),
datetime.utcnow() + timedelta(hours=1),
)
if __name__ == "__main__":
main()