def main():
"""Shows basic usage of the Google Calendar API.
Creates a Google Calendar API service object and outputs a list of the next
10 events on the user's calendar.
"""
credentials = get_credentials()
http = credentials.authorize(httplib2.Http())
service = discovery.build('calendar', 'v3', http=http)
CALENDAR_NAME = 'csv-to-calendar'
calendarID = initCalendar(service, CALENDAR_NAME)
mat = getMatrixFromCSV('timetable.csv')
events = parseMatrixIntoEvents(mat)
for x in events:
uploadEvent(service, x, calendarID)
评论列表
文章目录