You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
416 B
13 lines
416 B
from gcalendar import api
|
|
import json
|
|
import pprint
|
|
api = api(r'api_info\client_secret.json','api_info')
|
|
cals = api.get_calendars()
|
|
cal = next(filter(lambda cal: cal['id'] == api.ids['school schedule'],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('school schedule',body)
|