Last active
April 10, 2018 03:40
-
-
Save haingdc/655e4ed6a24f0d35d942d636397a2618 to your computer and use it in GitHub Desktop.
Thao tác với DOM thông qua TDD
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
//flickr-fetcher.js | |
fetchFlickrData: function(apiKey, fetch) { | |
if (!fetch && typeof jQuery !== "undefined") { | |
fetch = jQuery.getJSON.bind(jQuery); | |
} | |
var url = | |
"https://api.flickr.com/services/rest/?method=flickr.photos.search&api_key=" + | |
apiKey.toString() + | |
"&text=pugs&format=json&nojsoncallback=1"; | |
return fetch(url); | |
}, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment