MooFlickrBadge

  • 13 April

The latest MooTools-more RC version introduced this little cool thing called JSONP. Figured I'll give it a swing and create something that's actually using it – a flickr badge.

Possible options

new in 1.3

  • [new] toImage: returns the large image instead of a link to flickr.
  • [new] onComplete: fires an event when all images are loaded, passing an array of links as reference.

1.2

  • apikey: your API key if you have one, otherwise just use the one provided.
  • size: the size of displayed photos. Possible values are “s”, “m”, “l”.
  • method: the method you want to use, defaults to flickr.photos.getRecent. You can use any public method, such as flickr.photos.search and set the post data using passData.
  • amount: the number of photos to fetch and display.
  • passData: post data you want to pass with the request when using flickr.photos.search method.
  • onProgress: fires an event every time a photo is loaded and passes the image element reference.

new MooFlickrBadge('badge', {
	amount: 18
});
<div id="badge"></div>

Categories