Created
March 8, 2017 21:07
-
-
Save jkup/10e060698fb05ba24aa4572179a35881 to your computer and use it in GitHub Desktop.
This file contains 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
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