google-calendar-clf
v1.0.2
Published
calendar google api
Downloads
3
Readme
google-calendar
calendar google api
Install
npm install --save google-calendar-clf
Usage
Watch Calendar
const {watchCalendar} = require('google-calendar-clf')
const result = await watchCalendar(access_token, address, email)
- Response successful:
- 200 OK status code
- Response:
{ "kind": "api#channel", "id": "01234567-89ab-cdef-0123456789ab", "resourceId": "o3hgv1538sdjfh", "resourceUri": "https://www.googleapis.com/calendar/v3/calendars/[email protected]/events", "token": "target=myApp-myCalendarChannelDest", "expiration": 1426325213000, }
Document google watch calendar
Watch Calendar List
const {watchCalendar} = require('google-calendar-clf')
const result = await watchCalendarList(access_token, address)
- Response successful:
- 200 OK status code
- Response:
{ "kind": "api#channel", "id": string, "resourceId": string, "resourceUri": string, "token": string, "expiration": number }
Document google watch calendar list
CRUD and GET events
const {
getEventsCalendar,
getEventById,
createEvent,
updateEvent,
deleteEvent
} = require('google-calendar-clf')
const eventsCalendar = await getEventsCalendar(access_token, calendarId)
const event = await getEventById(access_token, calendarId, eventId)
const newEvent = await createEvent(access_token, calendarId, eventData)
const eventUpdate = await updateEvent(access_token, calendarId, eventData)
const deleteEvt = await deleteEvent(access_token, calendarId, eventId)
CRUD and GET Calendars
const {
getCalendarList,
getCalendarById,
createCalendar,
updateCalendar,
deleteCalendar
} = require('google-calendar-clf')
const listCals = await getCalendarList(access_token)
const calById = await getCalendarById(access_token, calendarId)
const newCal = await createCalendar(access_token, calendarData)
const calUpdate = await updateCalendar(access_token, calendarId, calendarData)
const deleteCal = await deleteCalendar(access_token, calendarId)