Google Calendar Event Feed

Version Travis CI

Eventfeed.js is a simple plugin for displaying a feed of upcoming events using Google Calendar API v3. No jQuery required, it's just plain javascript.

Installation

Installation is easy: Just download the script from the dist folder and include it in your HTML:

<script type="text/javascript" src="path/to/eventfeed.min.js"></script>

Basic Usage

To use, just declare a variable and assign to that a new instance of Eventfeed. When you're ready to initiate the feed, call the run() function on your variable.

<script type="text/javascript">
    var feed = new Eventfeed({
        calendarId: 'test@example.com'
    });
    feed.run();
</script>

Eventfeed will by default look for a <div id="eventfeed"></div> and fill it with the events.

<div id="eventfeed">
    <div class="event" id="{{id}}">
        <div class="date">
            <span class="month">{{month}}</span>
            <span class="day">{{day}}</span>
        </div>
        <div class="info">
            <span class="title">{{title}}</span>
            <span class="description">{{description}}</span>
            <span class="location">{{location}}</span>
        </div>
        <div class="time">
            <span class="start">From: {{start}}</span>
            <span class="end">To: {{end}}</span>
        </div>
    </div>
</div>

Requirements

The only thing you'll need is a calendar id for the public calendar. This is usually the email address used to create the calendar.

Standard Options

Advanced Options

FAQ

"Why am I getting a JSON error?"

First make sure the calendar linked to your id is public, and the hide details option is not checked (this limits JSON data returned).

Sharing Settings

Currently only @gmail.com addresses are supported. Using an account from a different domain, one that is connected through Google Apps, will automatically hide event details and the returned JSON data will be differently formatted.

To Do List

Change Log

1.0.0