javascript - Google Calendar API not pulling in start/end dates with one feed and pulling in start/end dates for past events with another feed -
i'm trying create "simple" (i'm hesitant use word) upcoming event list start and/or end date using google calendar api , using js parse through json feed. here's first json feed managed get:
https://www.google.com/calendar/feeds/actsi%40emory.edu/public/basic?orderby=starttime&sortorder=ascending&futureevents=true&alt=json
after reading documentation on bunch of sites how pull in start/end dates, became apparent json wasn't supplying data needed able pull feed. also, reoccurring events shows start date when event put calendar - not date that's coming falls on.
i did more research , produced second feed:
https://www.googleapis.com/calendar/v3/calendars/actsi%40emory.edu/events?orderby=starttime&singleevents=true&&key=aizasyasrqz4dqvd9jsgt2ygagjxpk2tez1cbvs
this 1 has start , end dates, whatever reason, dates 2008-2010 , nothing afterwards (again, need upcoming events). have js working pulling out title , start/end date (below), doesn't me if it's wrong info.
anyone have insight next steps on getting correct json feed??
here's js i'm using second feed:
$(document).ready(function() { var url = "https://www.googleapis.com/calendar/v3/calendars/actsi%40emory.edu/events?orderby=starttime&singleevents=true&&key=aizasyasrqz4dqvd9jsgt2ygagjxpk2tez1cbvs" $.getjson(url, function(data) { for(i in data['items']) { item = data['items'][i]; $("#event-list").append("<p>" + item.summary + "<br/>" + (item.start.datetime || item.start.date) + "<br/>" + (item.end.datetime || item.end.date) + "</p>"); } }); });
Comments
Post a Comment