Skip to content

@pilate /gist:768298 forked from seanh/gist:768283
Created

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js" type="text/javascript"></script>
<script type="text/javascript">
function fetchAndPrintPosts(id,num,tag)
{
// Read data from Tumblr, this creates the variable tumblr_api_read.
jQuery.ajax({
url : "http://staff.tumblr.com/api/read/json?num=" + num + "&filter=text&tagged=" + tag,
dataType : "jsonp",
success : function(test) {
//printPosts(id);
console.log(test);
}
});
}
function printPosts(id)
{
//var element_to_append_to = document.getElementById(id);
//var posts = tumblr_api_read["posts"];
}
fetchAndPrintPosts('latest_events',50,'events');
fetchAndPrintPosts('latest_press',50,'press');
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.