1import { email } from "https://esm.town/v/std/email?v=9";
2
3// Fetches a random joke.
4async function fetchRandomJoke() {
5 const response = await fetch(
6 "https://official-joke-api.appspot.com/random_joke",
7 );
9}
10
11const randomJoke = await fetchRandomJoke();
12const setup = randomJoke.setup;
13const punchline = randomJoke.punchline;
1import { email } from "https://esm.town/v/std/email?v=9";
2
3// Fetches a random joke.
4async function fetchRandomJoke() {
5 const response = await fetch(
6 "https://official-joke-api.appspot.com/random_joke",
7 );
9}
10
11const randomJoke = await fetchRandomJoke();
12const setup = randomJoke.setup;
13const punchline = randomJoke.punchline;
1import { email } from "https://esm.town/v/std/email?v=9";
2
3// Fetches a random joke.
4function fetchRandomJoke() {
5 const SAMPLE_JOKE = {
6 "setup": "What do you call a group of disorganized cats?",
10}
11
12const randomJoke = fetchRandomJoke();
13const setup = randomJoke.setup;
14const punchline = randomJoke.punchline;
1import { email } from "https://esm.town/v/std/email?v=9";
2
3// Fetches a random joke.
4async function fetchRandomJoke() {
5 const response = await fetch(
6 "https://official-joke-api.appspot.com/random_joke",
7 );
9}
10
11const randomJoke = await fetchRandomJoke();
12const setup = randomJoke.setup;
13const punchline = randomJoke.punchline;
86});
87
88export default app.fetch;
1import { email } from "https://esm.town/v/std/email?v=9";
2
3// Fetches a random joke.
4async function fetchRandomJoke() {
5 const response = await fetch(
6 "https://official-joke-api.appspot.com/random_joke",
7 );
9}
10
11const randomJoke = await fetchRandomJoke();
12const setup = randomJoke.setup;
13const punchline = randomJoke.punchline;
91app.get("/swagger", swaggerUI({ url: "/openapi.json" }));
92
93export default app.fetch;
56});
57
58export default app.fetch;
59
60async function getBadgeOptions(rssUrl: string | URL): Promise<BadgenOptions> {
1// import { fetch } from "https://esm.town/v/std/fetch?v=4";
2import ky, { HTTPError } from "npm:ky@1.1.3";
3
1import { fetch } from "https://esm.town/v/std/fetch";
2import process from "node:process";
3
7) {
8 const getRandomRhyme = async (word: string) => {
9 const rhymeRes = await fetch(
10 `https://api.datamuse.com/words?rel_rhy=${word}`,
11 );
20 };
21 const sendGroupmeMessage = async (bot_id: string, text: string) => {
22 const response = await fetch("https://api.groupme.com/v3/bots/post", {
23 method: "POST",
24 headers: {