Skip to content

Instantly share code, notes, and snippets.

@auser
Last active August 29, 2015 13:56
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save auser/9106603 to your computer and use it in GitHub Desktop.
Save auser/9106603 to your computer and use it in GitHub Desktop.
$http({
method: 'GET',
url: 'http://api.flickr.com/services/rest',
params: {
// Flickr API parameters
method: 'flickr.interestingness.getList',
api_key: apiKey,
format: 'json',
per_page: 3,
nojsoncallback: 1
}
}).then(function(data) {
$scope.photos = data.data.photos.photo;
});
$scope.getPhotoUrl = function(photo) {
return "http://farm"+photo.farm+
".static.flickr.com/"+
photo.server+"/"+
photo.id+"_"+photo.secret+".jpg";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment