public-gcal-fetch

0.3.3-1 • Public • Published

public-gcal-fetch

Fetch events from a public Google Calendar and return them in simplified JSON format; uses fetch api to support react-native and expo; fork of Espesen/public-gcal

Install:

npm install public-gcal-fetch

Usage example:

var PublicGcal = require('public-gcal-fetch')
  , API_key = 'your_api_key_here' (get one in Google developer console)
  , calendarID = 'public_calendar_id_here';

var gcal = new PublicGcal({API_key: API_key, calendarId: calendarID});

gcal.getEvents(function (error, result) {
  // result is now array of events
});

Method getEvents(options, callback) accepts following options:

  • singleEvents: defaults to true. Expand recurring events to single instances.
  • orderBy: defaults to startTime. Is ignored if singleEvents is false. See Google Calendar API
  • timeMin, timeMax: query date limits. Must be an RFC3339 timestamp with mandatory time zone offset, e.g., 2011-06-03T10:00:00-07:00
  • q: query string

Dependents (0)

Package Sidebar

Install

npm i public-gcal-fetch

Weekly Downloads

0

Version

0.3.3-1

License

ISC

Unpacked Size

14.7 kB

Total Files

8

Last publish

Collaborators

  • realtoadtoad