Val Town is a social website to write and deploy JavaScript.
Build APIs and schedule functions from your browser.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import { fetch } from "https://esm.town/v/std/fetch";
export const getFatCatListings = async () => {
const meResult = await fetch(
"https://api-mainnet.magiceden.dev/v2/collections/degenfatcats/listings?offset=0&limit=20",
{
headers: { Accept: "application/json" },
}
);
if (meResult.status === 200) {
return meResult.json();
}
throw new Error("Failed to get results");
};
October 23, 2023