'Returns events on the \'primary\' calendar from google cal.
:returns dict where the key is the google_cal event id, and the value the details of the event,
defined at https://developers.google.com/google-apps/calendar/v3/reference/events/list'

def get_event_synchro_dict(self, lastSync=False, token=False, nextPageToken=False):

    if (not token):
        token = self.get_token()
    params = {'fields': 'items,nextPageToken', 'access_token': token, 'maxResults': 1000}
    if lastSync:
        params['updatedMin'] = lastSync.strftime('%Y-%m-%dT%H:%M:%S.%fz')
        params['showDeleted'] = True
    else:
        params['timeMin'] = self.get_minTime().strftime('%Y-%m-%dT%H:%M:%S.%fz')
    headers = {'Content-type': 'application/json', 'Accept': 'text/plain'}
    url = ('/calendar/v3/calendars/%s/events' % 'primary')
    if nextPageToken:
        params['pageToken'] = nextPageToken
    (status, content, ask_time) = self.env['google.service']._do_request(url, params, headers, type='GET')
    google_events_dict = {}
    for google_event in content['items']:
        google_events_dict[google_event['id']] = google_event
    if content.get('nextPageToken'):
        google_events_dict.update(self.get_event_synchro_dict(lastSync=lastSync, token=token, nextPageToken=content['nextPageToken']))
    return google_events_dict
