I'm fetching the google calendar feeds in JSON format but when I try to display them, I don't see any results. I'm fetching the feed as follows and passing to another function as follows,
function OnLoad() {
feed.load(feedLoadedNews);
var feedevents = new google.feeds.Feed("http://ift.tt/1D0gPev");
console.log(feedevents);
feedevents.load(feedLoadedEventsTest);
}
The feed serves as an input to the following function,
function feedLoadedEventsTest(result) {
if (!result.error) {
var container = document.getElementById("feedControlEvents");
container.innerHTML='';
var entry =result.feed.entries[0];
console.log(entry);
var testing = entry.items;
console.log(testing);
}
}
My JSON input looks like this,
{
"kind": "calendar#events",
"summary": "Something",
"items": [
{
"summary": "Please Help",
"start": {
"dateTime": "2015-03-05T20:30:00Z"
},
{
"summary": "Thank You",
"start": {
"dateTime": "2015-02-26T20:30:00Z"
}
]
}
I need to fetch the summary and start time from the above JSON input. Forget about that, I'm unable to even display the feed through console. Any inputs would be helpful
Aucun commentaire:
Enregistrer un commentaire