function findEvents(user, keyword, start, end, optSince) {
  let params = {
    q: keyword,
    timeMin: formatDateAsRFC3339(start),
    timeMax: formatDateAsRFC3339(end),
    showDeleted: true,
  };
  if (optSince) {
    // This prevents the script from examining events that have not been
    // modified since the specified date (that is, the last time the
    // script was run).
    params.updatedMin = formatDateAsRFC3339(optSince);
  }
  let pageToken = null;
  let events = [];
  do {
    params.pageToken = pageToken;
    let response;
    try {
      response = Calendar.Events.list(user.getEmail(), params);
    } catch (e) {
      console.error('Error retriving events for %s, %s: %s; skipping',
          user, keyword, e.toString());
      continue;
    }
    events = events.concat(response.items.filter(function(item) {
      return shouldImportEvent(user, keyword, item);
    }));
    pageToken = response.nextPageToken;
  } while (pageToken);
  return events;
}
In a given user's calendar, looks for occurrences of the given keyword
in events within the specified date range and returns any such events
found.
@param {Session.User} user The user to retrieve events for.
@param {string} keyword The keyword to look for.
@param {Date} start The starting date of the range to examine.
@param {Date} end The ending date of the range to examine.
@param {Date} optSince A date indicating the last time this script was run.
@return {Calendar.Event[]} An array of calendar events.