Skip to content

Instantly share code, notes, and snippets.

@didacus
Created August 9, 2020 20:07
Show Gist options
  • Select an option

  • Save didacus/03d9d70cfed6a8d856b23b7fcd3fde2d to your computer and use it in GitHub Desktop.

Select an option

Save didacus/03d9d70cfed6a8d856b23b7fcd3fde2d to your computer and use it in GitHub Desktop.
var api = 'https://api.giphy.com/v1/gifs/search?';
var apiKey = '&api_key=dc6zaTOxFJmzC';
var query = '&q=rainbow';
function setup() {
noCanvas();
var url = api + apiKey + query;
loadJSON(url, gotData);
}
function gotData(giphy) {
for (var i = 0; i < giphy.data.length; i++) {
createImg(giphy.data[i].images.original.url);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment