Skip to content

some suggestions: #38

@toddlekan

Description

@toddlekan

Thanks for the awesome library, this helped me a lot! Here are some changes I made:

  1. No permission to push, or I would have created a PR:

CalendarAPI.js:29
scopes: ['https://www.googleapis.com/auth/calendar'],
// delegationEmail:
// https://github.com/extrabacon/google-oauth-jwt
// "if access is being granted on behalf of someone else, specifies who is impersonating the service account"
delegationEmail: config.delegationEmail

  1. A little easier way to to configure:

    this.config = {
    keyFile: ./credentials/${process.env.GOOGLE_CALENDAR_KEY_FILE_PEM},
    serviceAcctId: '[email protected]',
    timezone: 'UTC+08:00',
    delegationEmail: '[email protected]'
    };

const cal = new CalendarAPI(this.config);

  1. To make sure attendees get email notifications:

cal.Events.insert(calendarId, event, {"sendUpdates": "all"})

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions