This plugin tries to retrieve photos from any user Flickr using YQL and executing JavaScript in Open Data Table.
Request.JSONP (creates a JSON request using script tag injection and handles the callbacks for you).
var flickr = new Request.Flickr(params, options);
- params (Object) the desired username SlideShare.
- options (Object) An object containing the Request.Flickr instance's options. Note: all the options you know from the class Request.JSONP because we have an inheritance.
(Object) This instance of Request.Flickr.
All the events you know from Request.JSONP
(Function) - callback to execute when the data returns.
onSuccess(resp)
-
resp (object) - the response received from YQL proxy service.
ex: Object { query=Object, more...}
(Function) - callback to execute when the data returns.
onComplete(resp)
-
resp (object) - the response received from YQL proxy service.
ex: Object { query=Object, more...}
(Function) - fired when you make a request.
onRequest(scriptSrc, scriptEl)
- scriptSrc (string) - the script's src ex: http://query.yahooapis.com/v1/public/yql?q=...
- scriptEl (object) - the HTMLScriptElement ex: <script type="text/javascript" src="http://query.yahooapis.com/v1/public...
Executes a JSON request.
myreq.send([options]);
- options (Object, optional) - key/value options that configure the request. Note: all options you know from Request.JSONP.
- (Object) This instance of Request.Flickr.
Updates the content of an Element with the desired photos badge.
myElem.toFlickr(params);
- params (object) - parameters configuration.
- username (String) - the username Flickr.com you want.
- amount (Integer) - number of photos you want from user.
- tags (String) - the tag name. ex: beach.
- size (Char) - photos's size (ex: 's' for small, 't': for thumb, 'm': for medium).
(Element) - the target Element.
#html
<div id="badge"></div>
#js
$('badge').toFlickr({username: 'ericgozar', amount: 20, tags: 'beach', size: 's'});
see: Element.Properties
Sets a default Request.Flickr instance for an Element.
el.set('flickr'[, params [, options]);
- params - (object) the params flickr user.
- options - (object) the Request.Flickr options.
- (element) the original element.
$('badge').set('flickr',{username: 'ydn', amount: 20, size: 's', tags: 'hackathon'});
Returns the previously set Request.Flickr instance (or a new one with default options).
el.get('flickr');
- property - (string) the Request.Flickr property argument.
- (object) The Request.Flickr instance.
myElem.get('flickr').send();
this method loads flickr photos from any user Flickr.
myElement.loadFlickrPhotos();
none.
- (element) This Element.
$('badge').set('flickr',{username: 'ydn', amount: 20, size: 's', tags: 'hackathon'});
$('badge').loadFlickrPhotos();