1
2
3
4
5
6
7
8
import process from "node:process";
export const fetchGiphy = (async (searchTerm) => {
const { GiphyFetch } = await import("npm:@giphy/js-fetch-api");
const gf = new GiphyFetch(process.env.giphyApiKey);
const { data: gifs } = await gf.search(searchTerm, { limit: 10 });
return gifs;
});