|
|
|
@ -1,16 +0,0 @@ |
|
|
|
from gcalendar import calendar_api |
|
|
|
import json |
|
|
|
import pprint |
|
|
|
|
|
|
|
api = calendar_api("class", r"api_info\client_secret.json", "api_info") |
|
|
|
cals = api.get_calendars() |
|
|
|
cal = next( |
|
|
|
filter(lambda cal: cal["id"] == api.ids["Raphael's School Schedule".lower()], cals) |
|
|
|
) |
|
|
|
with open("classes.json") as file: |
|
|
|
bodies = json.load(file) |
|
|
|
for body in bodies: |
|
|
|
# body['colorId'] = cal['colorId'] |
|
|
|
# pprint.pprint(body) |
|
|
|
# input() |
|
|
|
api.create_event("Raphael's School Schedule".lower(), body) |