1
2
3
4
5
6
7
8
9
import { secrets } from "https://esm.town/v/me/secrets";
export const fetchGiphy = (async (searchTerm) => {
const { GiphyFetch } = await import("npm:@giphy/js-fetch-api");
const gf = new GiphyFetch(secrets.giphyApiKey);
const { data: gifs } = await gf.search(searchTerm, { limit: 10 });
return gifs;
});
// Forked from @simply_say_m.fetchGiphy