7

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": "snaggs@gmail.com"
  },
  "creator": {
    "email": "snaggs@gmail.com"
  },
  "owner": {
    "email": "snaggs@gmail.com"
  },
  "accessLevel": "owner"
}



we have "id": "bGxwb3VoZXJkcGYyY2NlaDluMW41dWRvNm9gc2hvdXN0aW5AbQ", that is used for google.calendar.showEvent("bGxwb3VoZXJkcGYyY2NlaDluMW41dWRvNm9gc2hvdXN0aW5AbQ")

How to fetch meeting UID for example llpouherdpf2cceh7n1n5udo6o@google.com

Please help,

snaggs
  • 5,543
  • 17
  • 64
  • 127
  • 1
    Is that the [iCalUID](https://developers.google.com/google-apps/calendar/v3/reference/events)? The way you're getting event info does not include iCalUID, it just gets event info that describes the event on screen. More details on what parameters are available for it are [here](https://developers.google.com/google-apps/calendar/gadgets/sidebar/#calendar.event). iCalUID is not listed. However you can retrieve it with [Events.get](https://developers.google.com/google-apps/calendar/v3/reference/events/get), it should be included in the response. – Andy Jul 21 '15 at 22:23
  • Maybe the information that you are looking for is in the body of the event ? It is not transmitted by default (you have to ask for it) Please check the table here: [calendar.event](https://developers.google.com/google-apps/calendar/gadgets/sidebar/#calendar.event) – KarelG Aug 02 '15 at 08:27

0 Answers0