<html>
<body class="yui3-skin-sam">
<!-- This DIV Element is for displaying
posts from the YQL QUERY RESPONSE(JSON)
details in YUI3 DATATABLE -->
<div id="yui-blogger-rss-feed-table">
</div>
<!-- This UL Element is for displaying
post count, created date, language -->
<ul class='response-status'>
</ul>
</body>
</html>
YUI().use('node', 'yql','datatable','datatable-scroll', "datatype-date", function (Y) {
var resultItems,
results, postTable,
/*This YQL query is for my Blogger's RSS feed.*/
yqlRssUrl = "select title, pubDate, link from rss where "+
"url='http://www.tutorialsavvy.com/feeds/posts/default?alt=rss&format=json&diagnostics=true'",
responseStatus = Y.one(".response-status"),
rssYqlFeedTable = Y.one("#yui-blogger-rss-feed-table"),
/*HTML template for LINK of the post*/
formatLink = "<td class='yui3-datatable-cell'><a class='blogger-post-link' href='{content}'>{content}</a></td>",
/*HTML template for TITLE of the post*/
formatTitle = "<td class='yui3-datatable-cell blogger-post-title'>{content}</td>",
/*Formatter function for formatting a date, pubDate*/
formatPubDate = function(o){
return Y.DataType.Date.format(Y.DataType.Date.parse(o.value), {format:"%Y-%m-%d"});
}
/* This will return 25 results As Blogger return 25 posts by DEFAULT.
* This can be changed to some other number using
* LIMIT parameter.
*/
Y.YQL( yqlRssUrl, function(feed) {
results = feed.query;
resultItems = feed.query.results.item;
responseStatus.appendChild("<li> Count of Posts (in response) : <span class='response-text'>"+results.count+"</span></li>");
responseStatus.appendChild("<li>Created Date : <span class='response-text'>"+results.created+"</span></li>");
responseStatus.appendChild("<li>Post Language : <span class='response-text'>"+results.lang+"</span></li>");
postTable = new Y.DataTable({
columns: [
{ key: "title", label: "POST TITLE", cellTemplate: formatTitle},
{ key: "pubDate", label: "PUBLICATION DATE", formatter: formatPubDate},
{ key: "link", label: "POST LINK",...
Please Whitelist JSFiddle in your content blocker.
Help keep JSFiddle free for always by one of two ways:
Whitelist JSFiddle in your content blocker (two clicks)
Go PRO and get access to additional PRO features →
Join the 4+ million users, and keep the JSFiddle dream alive.
Ad-free
All ads in the editor and listing pages are turned completely off.
Fiddle Pages
Your fiddles accessible under a custom domain and a vanity path - the simplest hosting for your personal project.
Use pre-released features
You get to try and use features (like the Palette Color Generator) months before everyone else.
Fiddle collections
Sort and categorize your Fiddles into multiple collections.
Private collections and fiddles
You can make as many Private Fiddles, and Private Collections as you wish!
Get Fiddle Pages with PRO
Your fiddles accessible under a custom domain and a vanity path - the simplest hosting for your personal project.