1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3// Github profile
4export let githubUser = fetchJSON(
5 "https://api.github.com/users/theAJFM"
6);
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export async function checkPollingStatus() {
15 ];
16 const results = [];
17 const tasResponse = await fetch(tasUrl, {
18 method: "GET",
19 });
24 for (const url of urls) {
25 try {
26 const response = await fetch(url, {
27 method: "GET",
28 });
1export function testFetch(params: any) {
2 return params;
3}
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3export const nasaAPOD = fetchJSON("cutt.ly/T7ksirK");
4// Forked from @iBrokeit.nasaAPOD
1import { fetchHtmlDom } from "https://esm.town/v/aeaton/fetchHtmlDom";
2
3export async function peelSessionArtistSessions(url) {
4 const dom = await fetchHtmlDom(url);
5 const list = dom.querySelector(".link-list");
6 const items = list.querySelectorAll("li > a");
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export const getIpInfo = async (req: express.Request) => {
4 const ip = (req as any).options.headers["true-client-ip"];
5 return await (await fetch(`http://ip-api.com/json/${ip}`)).json();
6};
1import { fetch } from "https://esm.town/v/std/fetch";
2import { email } from "https://esm.town/v/std/email?v=9";
3import process from "node:process";
19 };
20 try {
21 const response = await fetch(url, options);
22 const result = await response.json();
23 recipeName = result.results[randomNumber].name;
1import { fetchText } from "https://esm.town/v/stevekrouse/fetchText?v=5";
2
3export async function nyt(req: express.Request, res: express.Response) {
4 const data = await fetchText(
5 "https://cn.nytimes.com/",
6 {
1import { discordSendDM } from "https://esm.town/v/vtdocs/discordSendDM";
2import process from "node:process";
3import { discordFetch } from "https://esm.town/v/vtdocs/discordFetch";
4import { discordDMs } from "https://esm.town/v/vtdocs/discordDMs";
5
10 const repliesToBot = [];
11 for (const channelId of discordDMs) {
12 const messages = await discordFetch(
13 process.env.discordBot,
14 // Note: not using pagination here
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3// Returns NASA's Astronomy Picture of the Day (APOD)
4export const nasaAPOD = fetchJSON("cutt.ly/T7ksirK");
5// Forked from @iBrokeit.nasaAPOD