1import { fetchText } from "https://esm.town/v/stevekrouse/fetchText?v=5";
2
3/*
11export async function adcFeed(req, res) {
12 const feedUrl = "http://adc.equalarea.com/feed/";
13 const feedXml = await fetchText(feedUrl);
14 const enclosureRegex = /<enclosure .* type="audio\/ogg" \/>/g;
15 res.set("Content-Type", "application/rss+xml; charset=UTF-8");
1import { fetch } from "https://esm.town/v/std/fetch";
2import process from "node:process";
3
27 },
28 };
29 const result = await fetch(url, {
30 method: "POST",
31 headers: {
39 }
40 if (jobId) {
41 const result = await fetch(url + "/" + jobId, {
42 method: "GET",
43 headers: {
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export async function chatWithPdfRetriever(query: string, pdf_url: string) {
5 const queryUrl = "https://cardinal.tail8de85.ts.net/pdf/query";
6 // First POST request to load the PDF
7 const loadResponse = await fetch(loadUrl, {
8 method: "POST",
9 headers: {
18 }
19 // Second POST request to query the loaded PDF
20 const queryResponse = await fetch(queryUrl, {
21 method: "POST",
22 headers: {
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export let arenaApiExample = (async () => {
4 const resp = await fetch(
5 "http://api.are.na/v2/channels/that-glassy-dark-design-style",
6 );
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
2
3export let runGET = fetchJSON(
4 `https://api.val.town/v1/run/stevekrouse.add?args=${JSON.stringify([1, 2])}`,
5);
1import { discordFetch } from "https://esm.town/v/stevekrouse/discordFetch";
2
3export let getDiscordChannels = (token, guildId) => discordFetch(
4 token,
5 `guilds/${guildId}/channels`
1import { fetchDateMeProfiles } from "https://esm.town/v/stevekrouse/fetchDateMeProfiles";
2
3// date me docs of women in nyc
4export let dateMeNYWomen = fetchDateMeProfiles().then((
5 profiles,
6) =>
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
2
3export let spotifyAPI = ({token, endpoint, ...params}) => fetchJSON(
4 `https://api.spotify.com/v1/${endpoint}?${new URLSearchParams(params)}`,
5 {
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
2
3export let runPOST = fetchJSON(
4 `https://api.val.town/v1/run/stevekrouse.add`,
5 {
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