- MooTools -
- April 13th, 2009,
- 6 Responses
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 asflickr.photos.searchand set the post data usingpassData. - 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>
- Examples
- Get MooFlickrBadge-1.3.js (2Kb)
- Requires mootools-1.2.2-core.js and mootools-1.2.2.1-more.js or newer