Runs every 1 hrs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import { blob } from "https://esm.town/v/std/blob?v=12";
import { email } from "https://esm.town/v/std/email?v=9";
import { fetchText } from "https://esm.town/v/stevekrouse/fetchText";
export let newValTownOpenAPI = async () => {
const savedSpec = await blob.getJSON("vtOpenAPI");
let currentSpec = await fetchText(
"https://www.val.town/docs/openapi.yaml",
);
if (savedSpec !== currentSpec) {
await email({ subject: "New VT OpenAPI Spec" });
}
return blob.setJSON("vtOpenAPI", currentSpec);
};
Val Town is a social website to write and deploy JavaScript.
Build APIs and schedule functions from your browser.
Comments
Nobody has commented on this val yet: be the first!
May 2, 2024