Skip to content

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

License

Notifications You must be signed in to change notification settings

aekaisato/public-gcal-fetch

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%