1import { fetch } from "https://esm.town/v/std/fetch";
2
3export let result = (await fetch('https://swapi.dev/api/people/1/')).json()
1import { authenticateReddit } from "https://esm.town/v/mschleske/authenticateReddit";
2
3export const fetchRedditToken = async (
4 CLIENT_ID,
5 CLIENT_SECRET,
1import { fetch } from "https://esm.town/v/std/fetch";
2import { subtractFromDate } from "https://esm.town/v/alexandre/subtractFromDate";
3
7 1000,
8 );
9 const result = await fetch(
10 "https://gateway.thegraph.com/api/6e951d2948be69a241891fb15ec9cefb/deployments/id/QmYN4ofRb5CUg1WdpLhhNTVCuiiAt29hBKGjTnnxYh9zYt",
11 {
18 "sec-ch-ua-mobile": "?0",
19 "sec-ch-ua-platform": '"macOS"',
20 "sec-fetch-dest": "empty",
21 "sec-fetch-mode": "cors",
22 "sec-fetch-site": "same-site",
23 },
24 "referrer": "https://thegraph.com/",
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(),
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export const dsnyEventsFeed = (async () => {
4 const ics = await import("npm:ics");
5 const events = await fetch(
6 "https://a827-donatenyc.nyc.gov/DSNYApi/api/Events/GetAllByBorough?borough=",
7 )
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export let chessTime = (async () => {
4 const { secondsToHours } = await import("npm:date-fns");
5 const stats = await fetch("https://lichess.org/api/user/tmcw").then((r) =>
6 r.json()
7 );
1import { searchParams } from "https://esm.town/v/stevekrouse/searchParams";
2import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
3
4export async function references({ token, since, until, offset, limit }: {
23 "referencedAt": string;
24}[]> {
25 const res = await fetchJSON(
26 "https://api.val.town/v1/me/references?" +
27 searchParams({
1import { getGithubStars } from "https://esm.town/v/vtdocs/getGithubStars?v=2";
2import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
3
4// Github following
5export let githubFollowing =
6 (await fetchJSON(
7 "https://api.github.com/users/stevekrouse/following",
8 )).map((f) => f.login).map((h) => ({
1import process from "node:process";
2import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
3import { twitterJSON } from "https://esm.town/v/stevekrouse/twitterJSON";
4
6 let userId = 431200836; // stevekrouse
7 twitterJSON;
8 let resp = await fetchJSON(
9 `https://api.twitter.com/1.1/friends/ids.json?user_id=${userId}`,
10 {
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export const privateAPIUnauthenticated =
4 (await fetch("https://api.val.town/v1/run/stevekrouse.example3")).status;