python - Use Freebusy to other calendar than 'primary' -
i creating events not primary calendar, want check if user not busy in calendar, not in primary 1 event.
my query:
the_datetime = tz.localize(datetime.datetime(2016, 1, 3, 0)) the_datetime2 = tz.localize(datetime.datetime(2016, 1, 4, 8)) body = { "timemin": the_datetime.isoformat(), "timemax": the_datetime2.isoformat(), "timezone": 'us/central', "items": [{"id": 'my.email@gmail.com'}] } eventsresult = service.freebusy().query(body=body).execute()
it returns:
{'calendars': {'my.email@gmail.com': {'busy': []}}, 'kind': 'calendar#freebusy', 'timemax': '2016-01-04t14:00:00.000z', 'timemin': '2016-01-03t06:00:00.000z'}
even if have created date in x calendar, when create event in primary calendar have:
{'calendars': {'my.email@gmail.com': {'busy': [{'end': '2016-01-03t07:30:00-06:00', 'start': '2016-01-03t06:30:00-06:00'}]}}, 'kind': 'calendar#freebusy', 'timemax': '2016-01-04t14:00:00.000z', 'timemin': '2016-01-03t06:00:00.000z'}
is there way tell api calendar want check?
i found it! :d
in items of body, put calendar id instead of mail
wiki
Comments
Post a Comment