| Issue 2358: | Google calendar API v2 now deprecated and API v3 only supported | |
| 4 people starred this issue and may be notified of changes. | Back to list |
# You must follow these instructions when entering an issue: # # http://fullcalendar.io/wiki/Reporting-Bugs/ # http://fullcalendar.io/wiki/Requesting-Features/ # # Issues that do not follow these guidelines will be deleted without # explanation. # # Please erase this text and start typing :) Google have now switched off the v2 API so support for calendar feeds in gcal.js no longer work firstly because the changing of the feed type from basic to full result in a HTML 403 (Forbidden) error therefore no results are shown. Disabling the change of basic to full also fails as the gd protocol is no longer supported. More information can ve found at https://developers.google.com/google-apps/calendar/migration
Nov 17, 2014
#1
nampar...@gmail.com
Nov 17, 2014
A quick and dirty update I cobbled together for the transformOptions function in gcal.js from 2.2.0 is included below NOTE: You will need to generate a Google API Key for the calendar api and replace <Your Google API Key> in the following code with your own key (https://developers.google.com/api-client-library/python/guide/aaa_apikeys, https://developers.google.com/console/help/#activatingapis) function transformOptions(sourceOptions, start, end, timezone) { var success = sourceOptions.success; var data = $.extend({}, sourceOptions.data || {}, { timeMin: start.toJSON(), timeMax: end.toJSON(), singleEvents: true, maxResults: 9999 }); return $.extend({}, sourceOptions, { url: sourceOptions.url.replace(/www.google.com\/calendar\/feeds\//, 'www.googleapis.com/calendar/v3/calendars/').replace(/public\/basic$/, 'events?key=<Your Google API Key>'), dataType: 'jsonp', data: data, timezoneParam: 'ctz', startParam: 'start-min', endParam: 'start-max', success: function(data) { var events = []; if (data.items) { $.each(data.items, function(i, entry) { // var url; // $.each(entry.link, function(i, link) { // if (link.type == 'text/html') { // url = link.href; // if (timezone && timezone != 'local') { // url += (url.indexOf('?') == -1 ? '?' : '&') + 'ctz=' + encodeURIComponent(timezone); // } // } // }); events.push({ id: entry.id, title: entry.summary, start: entry.start.date, end: entry.end.date, url: entry.htmlLink, location: entry.location, description: entry.description }); }); } var args = [events].concat(Array.prototype.slice.call(arguments, 1)); var res = applyAll(success, this, args); if ($.isArray(res)) { return res; } return events; } }); }
Nov 17, 2014
(No comment was entered for this change.)
Status:
Duplicate
Mergedinto: 1526 |
|
| ► Sign in to add a comment |