0.3.3-1 • Published 6 years ago
public-gcal-fetch v0.3.3-1
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-fetchUsage 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 tostartTime. Is ignored ifsingleEventsis false. See Google Calendar APItimeMin,timeMax: query date limits. Must be an RFC3339 timestamp with mandatory time zone offset, e.g., 2011-06-03T10:00:00-07:00q: query string