1import { fetch } from "https://esm.town/v/std/fetch";
2
3export const trackIphoneTradein = async () => {
4 const cheerio = await import("npm:cheerio@1.0.0-rc.12");
5 const page = await fetch(
6 "https://www.apple.com/shop/browse/overlay/tradein_landing/iphone_values",
7 ).then((r) => r.text());
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export const politelyinvinciblepointerHandleFormEx = (async () => {
4 let body = { args: [{ email: "example@example.com" }] };
5 const response =
6 (await fetch(
7 "https://api.val.town/v1/run/politelyinvinciblepointer.handleForm",
8 {
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export let valTownApiExampleUser = (async () => {
4 const handle = "tmcw";
5 const response = await fetch(`https://api.val.town/v1/alias/${handle}`);
6 const json = await response.json();
7 return json;
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
2
3// Cities named Brooklyn
4export let githubStarred = fetchJSON(
5 "https://api.github.com/users/stevekrouse/starred",
6);
1import { fetchText } from "https://esm.town/v/stevekrouse/fetchText";
2
3export const noProxyEx = fetchText(
4 "https://www.schools.nyc.gov/docs/default-source/school-menus/2022-2023/june/pre-k---8-lunch-menu",
5 {
1import { dateMeURL } from "https://esm.town/v/stevekrouse/dateMeURL";
2import { fetchTable } from "https://esm.town/v/stevekrouse/fetchTable";
3
4export const dateMeProfiles = fetchTable(
5 dateMeURL,
6);
1import { msDay } from "https://esm.town/v/stevekrouse/msDay?v=1";
2import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
3
4export let openAQLocation = async ({
12 return q.charAt();
13 // Test
14 const { results } = fetchJSON(
15 "https://api.openaq.org/v2/locations?" +
16 new URLSearchParams({
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export let blocks = async (req, res) => {
23 }
24 }"
25 x-init="blocks = await (await fetch('https://storage.googleapis.com/bb-search-data/parsed/blocks-min.json')).json()"
26 >
27 <div class='grid gap-4 grid-cols-4 lg:grid-cols-8'>
51 </html>`);
52 }
53 const gistRes = await fetch(`https://api.github.com/gists/${id}`);
54 if (!gistRes.ok) {
55 return res.send("GitHub replied with a non-200 status.");
1import { fetchText } from "https://esm.town/v/stevekrouse/fetchText";
2
3export let dateMeRSSText = fetchText(
4 "https://stevekrouse-dateMeRSS.express.val.run",
5);
1import process from "node:process";
2import { basicAuthorization } from "https://esm.town/v/stevekrouse/basicAuthorization";
3import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
4
5export let hasValTownStyleGuideUpdated = async (since: Date) => {
6 let commits = await fetchJSON(
7 "https://api.github.com/repos/val-town/val.town/commits?path=/src/style.tsx&since=" +
8 since.toISOString(),