YQL Localcache
yqlcache.get({
yql: 'select * from flickr.photos.search(20) where user_id in (select value from html where url = "http://www.flickr.com/photos/codepo8" and xpath="//input[@name=\'w\']")',
id: 'myflickrcodepo8',
cacheage: (60*60*1000),
callback: function(o) {
if(window.console) {console.log(o);}
var photos = o.data.photo, n = photos.length;
var output = '<ul class="flickr">';
if(photos.length > 0) {
for(var photo in photos) {
output +="<li><a title='"+photos[photo].title+"' href='http://www.flickr.com/photos/"+photos[photo].owner.nsid+"/"+photos[photo].id+"' target='_blank'><img src='http://farm"+photos[photo].farm+".static.flickr.com/"+photos[photo].server+"/"+photos[photo].id+"_"+photos[photo].secret+".jpg' alt='"+photos[photo].title+"' width='75' height='75'/></a></li>";
}
} else {
output += '</li>No Photos found.</li>';
}
output += '</ul>';
document.getElementById('flickr').innerHTML = output;
document.getElementById('status').innerHTML = 'Status: ' + o.type;
}
});
Loading...