upload.py 文件源码

python
阅读 36 收藏 0 点赞 0 评论 0

项目:csv-to-calendar 作者: egeldenhuys 项目源码 文件源码
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)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号