Skip to content

Instantly share code, notes, and snippets.

@haingdc
Last active April 10, 2018 03:40
Show Gist options
  • Select an option

  • Save haingdc/655e4ed6a24f0d35d942d636397a2618 to your computer and use it in GitHub Desktop.

Select an option

Save haingdc/655e4ed6a24f0d35d942d636397a2618 to your computer and use it in GitHub Desktop.

Revisions

  1. haingdc renamed this gist Apr 10, 2018. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  2. haingdc created this gist Apr 10, 2018.
    11 changes: 11 additions & 0 deletions flickr-fetcher07.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,11 @@
    //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);
    },