Public
Cron
1
2
3
4
5
6
7
8
9
10
import { email } from "https://esm.town/v/std/email";
import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
export async function dailyDadJoke() {
let { setup, punchline } = await fetchJSON("https://official-joke-api.appspot.com/random_joke");
return email({
text: punchline,
subject: setup,
});
}
Val Town is a social website to write and deploy JavaScript.
Build APIs and schedule functions from your browser.
December 12, 2023
Is there a way to limit it to
type: programming
Yes!
https://official-joke-api.appspot.com/jokes/programming/random
Just added a comment about that to the docs.