1import { fetch } from "https://esm.town/v/std/fetch";
2import process from "node:process";
3
4export async function sendLarkMessage(message) {
5 return fetch(process.env.larkRobotUrl, {
6 method: "POST",
7 headers: {
1import { fetchRSS } from "https://esm.town/v/stevekrouse/fetchRSS?v=12";
2
3export const randomRSSTitle = async (url: string): Promise<unknown> => {
4 const response = await fetchRSS(
5 "http://www.techmeme.com/feed.xml"
6 );
1import { telegramSendMessage } from "https://esm.town/v/vtdocs/telegramSendMessage?v=5";
2import { fetchTweet } from "https://esm.town/v/dpetrouk/fetchTweet";
3import process from "node:process";
4
15 }
16 // Echo back the user's message
17 const { created_at, text, user } = await fetchTweet(
18 req.body.message.text,
19 );
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export const getTideTimes = (async () => {
4 const cheerio = await import("npm:cheerio");
5 const response = await fetch(
6 "https://www.worldtides.info/tidestations/Europe/Ireland/DUBLIN_(NORTH_WALL)",
7 );
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`