-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathflicker.html
More file actions
34 lines (29 loc) · 929 Bytes
/
flicker.html
File metadata and controls
34 lines (29 loc) · 929 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery.getJSON demo</title>
<style>
img {
height: 100px;
float: left;
}
</style>
<script src="https://code.jquery.com/jquery-1.10.2.js"></script>
</head>
<body>
<div id="images"></div>
<script>
//Flicker photo Search---to make url
(function() {
var flickerAPI = "https://api.flickr.com/services/rest/?method=flickr.photos.search&api_key=c3c6b55e576bcc4e0352dd6fc9895d12&user_id=130202134%40N05&format=json&nojsoncallback=1&api_sig=15d8837842b83ba33cf8cb76abc8abb0";
$.getJSON( flickerAPI, {
})
.done(function( data ) {
$.each( data.photos.photo, function( i, item ) {
var img_src ="http://farm" + item.farm + ".static.flickr.com/" + item.server + "/" + item.id + "_" + item.secret + "_" + "s.jpg";
$( "<img>" ).attr( "src", img_src ).appendTo( "#images" );
});
});
})();
</script>