1.0.2 • Published 3 years ago

google-calendar-clf v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

google-calendar

calendar google api

NPM JavaScript Style Guide

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/my_calendar@gmail.com/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)

Document google events

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)

Document google calendars

License

MIT © datnv1098 Clasfunc