sync-google-calendar-event
v0.0.5
Published
Check serve.js inside dev folder on how to use the package
Downloads
2
Readme
witty-google-calendar
Check serve.js inside dev folder on how to use the package
How to use the package
- Install the package npm install sync-google-calendar-event
- Import the package
- Use the package and pass a parameter called config
Vue.use(Package, { config: { apiKey: 'YOUR_API_KEY', clientId: 'YOUR_CLIENT_ID', discoveryDocs: ["https://www.googleapis.com/discovery/v1/apis/calendar/v3/rest"], scope: 'https://www.googleapis.com/auth/calendar' } })
- Use this component anywhere from your Vue components "sync-google-calendar-event"
- To insert event just call and pass a parameter this.$googleCalendar.insertEvents(events) Example parameter for the events [ { summary: "SAMPLE TITLE", //Required location: "SAMPLE LOCATION", //Required description: "SAMPLE DESCRIPTION", //Required start: { //Required dateTime: new Date("2021-11-08 9:00"), timeZone: "Asia/Manila", }, end: { //Required dateTime: new Date("2021-11-08 10:00"), timeZone: "Asia/Manila", }, recurrence: ["RRULE:FREQ=DAILY;COUNT=1"], attendees: [{ email: "[email protected]" }], reminders: { useDefault: false, overrides: [ { method: "email", minutes: 24 * 60 }, { method: "popup", minutes: 10 }, ], }, } ] For the other properties, please refer link below. https://developers.google.com/calendar/api/v3/reference/events/insert