2
votes

I want to get google calendar holiday

this function is from https://developers.google.com/google-apps/calendar/quickstart/nodejs

work well with only calendarID of me ...........

 function listEvents(auth) {
       var calendar = google.calendar('v3');
       calendar.events.list({
       auth: auth,
       calendarId: 'en.thai#[email protected]',
       timeMin: (new Date()).toISOString(),
       maxResults: 10,
       singleEvents: true,
       orderBy: 'startTime'
       }, function(err, response) {
          if (err) {
             console.log('The API returned an error: ' + err);
             return;
       }
       var events = response.items;
       if (events.length == 0) {
          console.log('No upcoming events found.');
       } else {
         console.log('Upcoming 10 events:');
         for (var i = 0; i < events.length; i++) {
            var event = events[i];
            var start = event.start.dateTime || event.start.date;
            console.log('%s - %s', start, event.summary);
          }
        }
      });
     }
the problem is when i use calendarID as 'primary' and '[email protected]' work but not on any calendar url such as

en.thai#[email protected] | en.th#[email protected] | en.uk#[email protected] please help thank you

calenderId : 'me' or 'primary........... output : 'list of all events'

calenderId : en.th#[email protected]....... output : The API returned an error: Error: Not Found

1

1 Answers