1.0.2 • Published 7 years ago

gcal-get-events v1.0.2

Weekly downloads
2
License
ISC
Repository
github
Last release
7 years ago

GCal Events

API to get events from a given Google Calendar

Define a secrets.js file that looks like

    module.exports = {
        apiKey: XXX,
        calendarid: XXX,
    };

or paste key/id directly into options passed to library.

Create an api key through google API console and enable it for Google Calendar use.

Get the calendar ID that you want to populate events from

gcal-get-events takes an object that looks like

    {
        whitelist: [],
        start: <ms>,
        end: <ms>,
        count: <# events to return>
        apiKey: <secrets.apiKey>,
        calendarId: <secrets.calendarId>
    }

whitelist contains the fields that you would like returned. If whitelist is empty, all fields will be returned. Fields include:

  • created
  • creator
  • end
  • etag
  • htmlLink
  • iCalUID
  • id
  • kind
  • location
  • organizer
  • originalStartTime
  • sequence
  • start
  • status
  • summary
  • updated

start and end specify the time frame you would like events returned within (in ms). Omitting these fields will result in a default start of now and default end of one week from now.

count specifies the number of events to return.

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago