This project is not covered by Drupal’s security advisory policy.
Drupal 8
We no longer need this module in drupal 8, Developers need to use Google Api Client to authenticate. Once we have a account authenticated for Google Calendar API, all we need is to call "getServiceObjects"
example:
// Load the account
$google_api_client = \Drupal::entityTypeManager()->getStorage('google_api_client')->load(ACCOUNT_ID);
// Get the service.
$googleService = \Drupal::service('google_api_client.client');
$googleService->setGoogleApiClient($google_api_client);
// Try your API Operations.
try {
$expired = $googleService->googleClient->isAccessTokenExpired();
// ksm($expired);
// Fetch calendar object.
$object = $googleService->getServiceObjects();
// $object['calendar'] is a object of Google_Service_Calendar
$calendar = $object['calendar']->calendars->get(CAL_ID);
}
catch (Exception $e) {
// ksm($e);
}
This module used to provide procedure oriented functions, now as drupal 8 is object oriented I don't think we need to create a wrapper class but I leave developers to access full potential of the Google API php client classes. I'll support Google Api Client module and will help anyone who wants to use Calendar integrations in drupal 8 using Google Api Client.
If developers want to keep existing code as it is and migrate to drupal 8, I recommend to refer to the drupal 7 module and copy the function body you were invoking and replace the part where it loads the calendar object from gcal_calendar_object
and instead use the getServiceObjects
of the gauth account as in above example.
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
$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
$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
- Seeking co-maintainer(s)
Maintainers are looking for help reviewing issues. - Module categories: Integrations
- 87 sites report using this module
- Created by aacraig on , updated
- This project is not covered by the security advisory policy.
Use at your own risk! It may have publicly disclosed vulnerabilities.
Releases
Development version: 7.x-1.x-dev updated 31 Jul 2016 at 14:28 UTC