1import { fetchXML } from "https://esm.town/v/stevekrouse/fetchXML";
2
3export let untitled_blackCrayfish = fetchXML(
4 "https://www.readtangle.com/archive/rss/",
5);
1import { discordSendDM } from "https://esm.town/v/vtdocs/discordSendDM?v=6";
2import process from "node:process";
3import { discordFetch } from "https://esm.town/v/vtdocs/discordFetch?v=10";
4import { randomize } from "https://esm.town/v/stevekrouse/randomize";
5import { discordDMs } from "https://esm.town/v/stevekrouse/discordDMs";
15 )
16 ) {
17 const messages = await discordFetch(
18 process.env.discordBot,
19 // Note: not using pagination here
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export let untitled_ivoryFlea = () => fetch("https://emojicdn.elk.sh/❤️");
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
2import process from "node:process";
3import { parentReference } from "https://esm.town/v/stevekrouse/parentReference";
45 : process.env.rlimitNamespacePassword;
46 //
47 const limit = await fetchJSON(
48 `https://api.rlimit.com/limit/${namespaceId}/${type}/${max}/${interval}/${key}?cost=${cost}&subNamespace=${subNamespace}&password=${pass}`,
49 );
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
2
3export const getPublicVals = async (username) => {
4 let { id } = await fetchJSON(
5 `https://api.val.town/v1/alias/${username}`,
6 );
7 return fetchJSON(
8 `https://api.val.town/v1/users/${id}/vals`,
9 );
1import { TEST_API } from "https://esm.town/v/stevekrouse/TEST_API";
2import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
3
4export async function testMutateSemantics2({
15 authenticated: boolean;
16}) {
17 const { data: last } = await fetchJSON(
18 `${TEST_API}/eval/${stateName}`
19 );
20 const now = Date.now();
21 await fetchJSON(
22 `${TEST_API}/eval/${mutator(now)}`
23 );
24 const { data: next } = await fetchJSON(
25 `${TEST_API}/eval/${stateName}`
26 );
1import { fetch } from "https://esm.town/v/std/fetch";
2
3// E.g. from a user's perspective (not the real execution time!)
8 for (let i = 0; i < count; i++) {
9 let start = Date.now();
10 await fetch("https://api.val.town/eval/(()=%3E1+1)()");
11 evalTimes.push(Date.now() - start);
12 }
23 for (let i = 0; i < count; i++) {
24 let start = Date.now();
25 await fetch("https://api.val.town/eval/@healeycodes.addOnes()");
26 userFuncTimes.push(Date.now() - start);
27 }
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3// Github following!
4export let githubFollowing = (() => {
5 throw new Error(`${fetchJSON.impl.toString()}`);
6 return fetchJSON(
7 "https://api.github.com/users/stevekrouse/following"
8 );
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export let jsYAMLExample = (async () => {
4 // Import the YAML parser
5 const jsYaml = await import("npm:js-yaml");
6 // Fetch a YAML file
7 const yaml = await fetch(
8 "https://raw.githubusercontent.com/docker/engine/8955d8da8951695a98eb7e15bead19d402c6eb27/api/swagger.yaml",
9 ).then((r) => r.text());
10 // parse the fetched file
11 const obj = jsYaml.load(yaml);
12 // Return part of the file
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());