Skip to content

Instantly share code, notes, and snippets.

View alexeykomov's full-sized avatar

Alexey alexeykomov

View GitHub Profile
@alexeykomov
alexeykomov / images
Last active February 11, 2022 15:16 — forked from Arkhipenka/images
const keyImg = 'c9c70ab642fedb925db9bfb33b4f73f1';
const b = document.getElementById('body');
let btn = document.getElementById('btn-search');
let input = document.getElementById('search');
let section = document.getElementById('section');
async function getImg(word) {
try {
const url = `https://www.flickr.com/services/rest/?method=flickr.photos.search&api_key=${keyImg}&tags=${word}&tag_mode=all&extras=url_h&format=json&nojsoncallback=1`;
const res = await fetch(url);