1import { paginateAPI } from "https://esm.town/v/andreterron/paginateAPI";
2import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
3import process from "node:process";
4
14 },
15 };
16 const me = await fetchJSON(
17 "https://api.val.town/v1/me",
18 opts,
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2import { runVal } from "https://esm.town/v/std/runVal";
3
10 description,
11 );
12 const val = await fetchJSON(
13 `https://api.val.town/v1/vals`,
14 {
1import { fetchJSON } from "https://esm.town/v/val/fetchJSON";
2
3export let postWebhookTest4 = fetchJSON(
4 "https://api.val.town/express/@val.postWebhook5",
5 {
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3// Public holidays in the US in 2023
4export let holidaysUS = fetchJSON(
5 "https://date.nager.at/api/v2/publicholidays/2023/US"
6);
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3// GitHub gists
4export let githubGists = fetchJSON(
5 "https://api.github.com/users/stevekrouse/gists"
6);
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export function getCoolPosts() {
4 return fetch("https://hn.algolia.com/api/v1/search_by_date?tags=author_pg")
5 .then((res) => res.json())
6 .then((res) => res.hits[0].comment_text);
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3export const variablePower = (request, response) => {
25`;
26
27 fetchJSON("https://api.magicthegathering.io/v1/cards?power=*")
28 .then(({ cards }) => {
29 const names = new Set();
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export const weatherDescription = async (
4 params: string[]
5): Promise<unknown> => {
6 let data = await fetch(`https://wttr.in/${params["city"]}?format=j1`);
7 let jsonData = await data.json();
8 return `${params["city"]}: ${jsonData["current_condition"][0]["FeelsLikeC"]}, ${jsonData["current_condition"][0]["weatherDesc"][0]["value"]}`;
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3// Reddit recent posts from /r/aww (cute animals)
4export let subredditExample = fetchJSON(
5 "https://www.reddit.com/r/aww/.json"
6);
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3// GitHub events
4export let githubEvents = fetchJSON(
5 "https://api.github.com/users/stevekrouse/events"
6);