1import { fetchHtmlDom } from "https://esm.town/v/aeaton/fetchHtmlDom";
2
3export async function peelSessionArtist(url) {
4 const dom = await fetchHtmlDom(url);
5 const title = dom.querySelector("h3")?.textContent.trim();
6 const bio = dom.querySelector("#bio1")?.textContent.trim();
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);
1import { fetchText } from "https://esm.town/v/stevekrouse/fetchText?v=5";
2
3// Random math fact
4export let mathFact = fetchText(
5 "http://numbersapi.com/random/math"
6);
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3export async function fetchValTownAPI(
4 apiToken: string,
5 path: string,
12 path = "/v1" + path;
13 }
14 return fetchJSON(`https://api.val.town${path}`, {
15 ...options,
16 headers: {
1import { fetch } from "https://esm.town/v/std/fetch";
2import process from "node:process";
3
14 };
15 const voiceId = "21m00Tcm4TlvDq8ikWAM"; // https://api.elevenlabs.io/v1/voices
16 const audio = await fetch(
17 `https://api.elevenlabs.io/v1/text-to-speech/${voiceId}`,
18 {
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export const dighimapperMultipleMaps = (async () => {
4 const url =
5 "https://annotations.allmaps.org/maps?imageservicedomain=images.dighimapper.eu";
6 const reponse = await fetch(url);
7 const annotations = await reponse.json();
8 let imageIds = new Set();
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export async function getMunichSwimCapacit() {
21 { id: 30200, name: "Dantebad Sauna" },
22 ];
23 async function fetchCount(id) {
24 const endpoint =
25 `https://functions.api.ticos-systems.cloud/api/gates/counter?organizationUnitIds=${id}`;
26 const response = await fetch(endpoint, {
27 headers: {
28 "abp-tenantid": "69",
34 "sec-ch-ua-mobile": "?0",
35 "sec-ch-ua-platform": '"macOS"',
36 "sec-fetch-dest": "empty",
37 "sec-fetch-mode": "cors",
38 "sec-fetch-site": "cross-site",
39 },
40 referrer: "https://www.swm.de/",
51 async function populateUnits() {
52 for (let unit of organizationUnitIds) {
53 const populatedUnit = await fetchCount(unit.id);
54 unit.personCount = populatedUnit.personCount;
55 unit.maxPersonCount = populatedUnit.maxPersonCount;
1import { fetch } from "https://esm.town/v/std/fetch";
2import { API_BASE_URL } from "https://esm.town/v/mangadex/API_BASE_URL";
3
27 password: string,
28): Promise<LoginResponse> => {
29 const response = await fetch(
30 `${API_BASE_URL}/auth/login`,
31 {
1import { fetch } from "https://esm.town/v/std/fetch";
2import { API_BASE_URL } from "https://esm.town/v/mangadex/API_BASE_URL";
3
26 return "The provided login credentials are incorrect.";
27 }
28 const response = await fetch(
29 `${API_BASE_URL}/list/${listId}/feed`,
30 {
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export const callIftttMakerWebhook = async (event: string, key: string) => {
4 await fetch(`https://maker.ifttt.com/trigger/${event}/json/with/key/${key}`);
5};