Skip to content

Instantly share code, notes, and snippets.

@damienstanton
Created January 28, 2015 14:37
Show Gist options
  • Select an option

  • Save damienstanton/2e4e4dd9c236c9e1086b to your computer and use it in GitHub Desktop.

Select an option

Save damienstanton/2e4e4dd9c236c9e1086b to your computer and use it in GitHub Desktop.
slack integration test
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery.getJSON demo</title>
<style>
img {
height: 100px;
float: left;
}
</style>
<script src="//code.jquery.com/jquery-1.10.2.js"></script>
<script>
(function() {
var flickerAPI = "http://api.flickr.com/services/feeds/photos_public.gne?jsoncallback=?";
$.getJSON( flickerAPI, {
tags: "panda",
tagmode: "any",
format: "json"
})
.done(function( data ) {
$.each( data.items, function( i, item ) {
$( "<img>" ).attr( "src", item.media.m ).appendTo( "#images" );
if ( i === 0 ) {
return false;
}
});
});
})();
</script>
</head>
<body>
<div id="images"></div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment