-
-
Save tatey/297142 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Set API Key | |
var flickr = $.flickr('123'); | |
// Request instance by invoking flickr service method | |
var recent = flickr.photos.getRecent({ | |
size: 's' | |
page: 1, | |
beforeSend: function() { | |
$('img#waiting').fadeIn(); | |
}, | |
success: function(thumbnails) { | |
$('img#waiting').fadeOut(); | |
$('#photos').append(thumbnails); | |
} | |
}); | |
// Request methods | |
recent.hasNext(); // >>> true # Next page? | |
recent.next(); // >>> Void # Gets the next page | |
recent.hasPrev(); // >>> true # Previous page? | |
recent.prev(); // >>> Void # Gets the previous page | |
recent.pageCount(); // >>> 50 # Total number of pages | |
recent.page() // >>> 2 # Current page |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment