Skip to content

Instantly share code, notes, and snippets.

@jkup
Created March 8, 2017 21:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jkup/10e060698fb05ba24aa4572179a35881 to your computer and use it in GitHub Desktop.
Save jkup/10e060698fb05ba24aa4572179a35881 to your computer and use it in GitHub Desktop.
request.onload = function () {
if (this.status >= 200 && this.status < 400) {
var data = JSON.parse(this.response)
data.photos.photo.map(function (photo) {
var image = generateImageFromPhotoObject(photo)
wrapper.appendChild(image)
})
} else {
wrapper.innerHTML = 'We recieved an error from the Flickr API. Please try again later.'
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment