Hi all I am trying to insert multiple events into google calendar (events count are 67) . Everything works good but I have got sometime error like
errors: [{domain: "usageLimits", reason: "rateLimitExceeded", message: "Rate Limit Exceeded"
I think that mean that I can not do so much calls.
I have write this code
var makeRequest = function(resource) {
console.log(resource);
var request = gapi.client.calendar.events.insert({
calendarId: 'primary',
resource: resource,
});
request.execute(function(resp) {
console.log(resp);
});
};
for (var j = 0; j < events.length; j++) {
makeRequest(events[j]);
}
I know that I need to use batch
like var batch = gapi.client.newBatch();
to avoid that problem but didn't understand how ... I looked here for some help Google Calendar javascript api - Add multiple events
Please help me to figure out how can I handle this problem.