def main():
"""
Shows basic usage of the Google Calendar API.
Creates a Google Calendar API service object, logs the query from the arguments, and creates an event with Quick Add.
"""
credentials = get_credentials()
http = credentials.authorize(httplib2.Http())
service = discovery.build('calendar', 'v3', http=http)
if len(sys.argv) > 1:
with open("log.txt", "a") as logfile:
logfile.write(flags.query + "\n")
created_event = service.events().quickAdd(
calendarId='primary',
text=flags.query
).execute()
评论列表
文章目录