Skip to content

Instantly share code, notes, and snippets.

@rtanglao
Created August 22, 2010 06:43
Show Gist options
  • Select an option

  • Save rtanglao/543440 to your computer and use it in GitHub Desktop.

Select an option

Save rtanglao/543440 to your computer and use it in GitHub Desktop.
last 5 updated GS topics
<!DOCTYPE html>
<html lang="en">
<body>
<ol>
<div id="dummy">
</div>
</ol>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" ></script>
<script>
(function($){
$.ajaxSetup({
cache: false // turn off AJAX caching so you actually get the top 5!
});
$.getJSON("http://api.getsatisfaction.com/products/mozilla_thunderbird/topics.json?sort=recently_active&limit=5&callback=?",
function(gsjs){ //gsjs is the JSON object from getsatisfaction
$.each(gsjs.data,function(i,topic) {
$("#dummy").append("<li><a href=\""+topic.at_sfn + "\">"+
topic.subject + "</a></li>");
});
});
})(jQuery);
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment