On Jun 9, 2:08 pm, Matt Kruse <[email protected]> wrote:
> document.getElementById('content').innerHTML =
> '<pre>'+responseText
> +'</pre>';
Oops, that line was for my debugging, it shouldn't be in there :)
Corrected:
function _IG_FetchFeedAsJSON(url,callback,num,summaries) {
var gurl = 'http://ajax.googleapis.com/ajax/services/feed/load?
v=1.0&num='+num+'&q=' + encodeURIComponent(url)+'&random='+ (+new
Date);
_IG_FetchContent(gurl,function(responseText) {
var json = eval('('+responseText+')');
if (!json || !json.responseData || !json.responseData.feed || !
json.responseData.feed.entries || json.responseStatus!=200) {
json.ErrorMsg = json.responseDetails;
}
else {
var feed = json.responseData.feed;
json.URL=url;
json.Title=feed.title;
json.Description=feed.description;
json.Link=feed.link;
json.Author=feed.author;
json.Entries=[];
for (var i=0; i<feed.entries.length; i++) {
var entry = feed.entries[i];
var date = new Date(entry.publishedDate);
date = date?date.getTime():new Date();
json.Entries.push( {
Title:entry.title,
Link:entry.link,
Summary:entry.content,
Date:date,
Author:entry.author,
Categories:entry.categories
} );
}
}
callback(json);
});
}
Matt Kruse
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"iGoogle Developer Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/Google-Gadgets-API?hl=en
-~----------~----~----~----~------~----~------~--~---