19 // like the sender and the message text
20 const result = await fetchJSON(
21 "https://slack.com/api/chat.postMessage",
22 {
23 headers: {
1export function myApi(name) {
2 return "hi " + name;
3}
1export function myApi(name) {
2 return "hi " + name;
3}
3
4export let geoffreyFollows = twitterJSON({
5 url: `https://api.twitter.com/1.1/friends/ids.json?screen_name=geoffreylitt`,
6 bearerToken: twitterCredentials.bearerToken
7}).then(x => x.ids)
1export function myApi(name) {
2 return "hi " + name;
3}
1export function myApi(name) {
2 return "hi " + name;
3}
26 : {};
27 return fetchJSON(
28 `https://api.val.town/v1/vals/${id}/versions?` +
29 searchParams({
30 offset: offset?.toString(),
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