This is a sidebar gadget that listens on event click and returns me event info (More Info):
<Module>
<ModulePrefs title="subscribeToEvents Test" height="200" author="me"
<Optional feature="google.calendar-0.5.read"/>
</ModulePrefs>
<Content type="html">
<![CDATA[
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<body>
<div id="out">No event</div>
<script>
function subscribeEventsCallback(e) {
var html = 'No event';
if (e) {
html = gadgets.json.stringify(e);
}
document.getElementById('out').innerHTML = gadgets.util.escapeString(html);
}
///https://www.google.com/calendar/b/1/render?gadgeturl=http://devblog.meeterapp.com/wp-content/uploads/2015/03/fess_subscribe_to_dates.xml#main_7
// The gadget containers request that we do NOT run any JS inline.
// Instead, register a callback handler.
gadgets.util.registerOnLoadHandler(function() {
google.calendar.read.subscribeToEvents(subscribeEventsCallback);
});
function showEvent(){
google.calendar.showEvent(localEevent.id);
}
</script>
</body>
</html>
]]></Content>
</Module>
The problem is: the JSON that Google returns me has id
but not UID,
Its unique id for google Calendar internal usage.
for example if user clicks on some event on Google calendar I get back this JSON:
{
"timezone": "Asia/Jerusalem",
"startTime": {
"year": 2015,
"month": 7,
"date": 6,
"hour": 14,
"minute": 0,
"second": 0
},
"endTime": {
"year": 2015,
"month": 7,
"date": 6,
"hour": 15,
"minute": 0,
"second": 0
},
"title": "Testing",
"location": "",
"id": "bGxwb3VoZXJkcGYyY2NlaDluMW41dWRvNm9gc2hvdXN0aW5AbQ",
"status": "invited",
"color": "#DB7972",
"palette": {
"darkest": "#D06B64",
"dark": "#924420",
"medium": "#D06B64",
"light": "#DB7972",
"lightest": "#F0D0CE"
},
"attendees": [],
"attendeeCount": 0,
"calendar": {
"email": "[email protected]"
},
"creator": {
"email": "[email protected]"
},
"owner": {
"email": "[email protected]"
},
"accessLevel": "owner"
}
we have "id": "bGxwb3VoZXJkcGYyY2NlaDluMW41dWRvNm9gc2hvdXN0aW5AbQ",
that is used for google.calendar.showEvent("bGxwb3VoZXJkcGYyY2NlaDluMW41dWRvNm9gc2hvdXN0aW5AbQ")
How to fetch meeting UID
for example [email protected]
Please help,