6 repo: string;
7 };
8 const markdown = await fetch(`https://api.github.com/repos/${repo}/readme`)
9 .then((res) => res.json()).then(({ content }) => atob(content));
10 const html = await fetch("https://api.github.com/markdown", {
11 method: "POST",
12 headers: {
1export function myApi(name) {
2 return "hi " + name;
3}
1import { mailbox } from "https://esm.town/v/nimalu/mailbox";
2
3// https://api.val.town/express/@nimalu.viewMailbox
4export const viewMailbox = (req, res) => {
5 const messages = mailbox
24 li.innerHTML = '<span class="font-semibold text-gray-900">Web</span>: ' + message;
25 ul.appendChild(li)
26 fetch("https://api.val.town/eval/@nimalu.messageMe('" + message + "','Web')")
27 }
28
1export function myApi(name) {
2 return "hi " + name;
3}
1export function myApi(name) {
2 return "hi " + name + "from" + $me;
3}
15 }
16 const githubEvents = await fetchJSON(
17 "https://api.github.com/users/daviddkkim/events",
18 ) as Data;
19 //early return if no github events
3// Public holidays in the US in 2023
4export let holidaysUS = fetchJSON(
5 "https://date.nager.at/api/v2/publicholidays/2023/US"
6);
1export function myApi(name) {
2 return "hi " + name;
3}
3export async function githubFollowers() {
4 let followers = await fetchJSON(
5 "https://api.github.com/users/stungeye/followers",
6 );
7 return followers;
2import { blocks as blocks2 } from "https://esm.town/v/rym/blocks";
3
4// Access via https://api.val.town/v1/express/rym.home
5export async function home(req: express.Request, res: express.Response) {
6 const blocks = await blocks2();