GCal - An implementation of the Google Calendar API for Drupal.

Drupal 6

Author: Aaron Craig (software@aaroncraig.com)
Developed by: Evolving Design (http://evolving-design.com)

This module implements the API described here: http://code.google.com/apis/calendar/data/2.0/developers_guide.html

The module is intended to be used by other modules who want to import/export to Google calendars.

Credits

This module is being developed by Evolving Design.

Quick Start

Create an account in your Drupal admin pages (admin/settings/gcal).

The Google account username and password are stored IN PLAIN TEXT on your database, so do not use this module in a shared server environment.

When the other authentication methods have been implemented, you may choose to use a more secure method.

Create a calendar

$calendar = array(
  'title' => 'My Calendar'
  'description' => 'Some text'
  'locale'  => 'en_US',
  'public'  => TRUE
);
$gcal_id = gcal_create_calendar($calendar); // using default account
// Store $gcal_id for further reference.

See documentation for more parameters.

Get and update events

$events = gcal_find_events($start_min, $start_max, $gmail_account_email);
// $events contains an array of events.
$events[0]['title'] = "New title";
$success = gcal_update_event($events[0]);
Create a new event

$event = array(
  'title'   => "Happy 4th of July Partyy",
  'start'  => "2010-07-04T150000.000",
  'end'   => "2010-07-04T210000.000",
  'description' => 'A big fireworks show!'
);
$success = gcal_create_event($event, $gmail_account_email);

Roadmap

The API is fairly large, but implementation should go quickly. Here's the list of priorities, as of now.

0.1-beta2
Finish implementing authentication protocols to remove necessity of storing password in clear text. This will be important for users on shared hosts.
0.2-beta1
Retrieve calendar lists.
0.2-beta2
Complete implementation of calendar creation with all parameters available.
0.2-beta3
Settings retrieval.
0.3-beta1
Complete implementation of event creation with all parameters available.
0.3-beta2
Expanded event management, ie. retrieving without query parameters and with full-text searches.
0.3-beta3
Recurring events.
0.4-beta1
Completely implement sharing management.
0.4-beta2
Completely implement subscription management.
0.5-beta1
Reminders and notifications.
0.5-beta2
Comments.
0.5-beta3
Extended properties.
0.5-beta4
GeoRSS data.
0.6-beta1
Partial response/request.
0.6-beta2
Batch operations.
0.7-beta1
Quick add events.
0.7-beta2
Calendar events gadgets.

Drupal 7

Developed by: Sadashiv

This module uses google api php client refer http://code.google.com/p/google-api-php-client/ to interact with google and manage calendars

Requirements
GAuth - Required for authenticating with google.

Api Functions

Create Calendar

<?php
$params
= array(
   
'Summary' => 'My Calendar'//Title of the calendar
 
);
gcal_calendar_create($params, 'Calendar_Account');   //Calendar_Account is the name of the oauth2 account managed with the help of GAuth.
?>

Create Event

<?php
$params
= array(
   
'Summary' => 'My Event'//Title of the event
   
'Start' => '2012-12-24 12:30:00',
   
'End' => '2012-12-24 14:30:00',
   
'Timezone' => 'Asia/Calcutta'
 
);
gcal_event_create($params, 'Calendar_id', 'Calendar_Account');   //Calendar_Account is the name of the oauth2 account managed with the help of GAuth.
?>

For more details and other functions refer EXAMPLE.txt in the module folder

Roadmap:
1 Create, update, delete, get secondary Calendars.
2 Fetch single Calendar setting and list of settings
3 Fetch Color settings
4 Create, update, delete, get, move Events.
5 Create, delete, get Acl
6 Create, update, delete, get CalendarList.
7 FreeBusy checking with events, quickAdd for events Current release includes
8 Import events and other features

Known issues:
1. Google Calendar List insert throws error. Issue registered at https://code.google.com/p/google-api-php-client/issues/detail?id=258&sta...

Project Information

Downloads