4 let pm25 = (
5 await fetchJSON(
6 "https://api.openaq.org/v2/latest?" +
7 new URLSearchParams({
8 limit: "10",
4
5export const FigmaFileObjectAsync = (async () => {
6 const apiToken = process.env.myFigmaAPIToken;
7 const fileKey = FigmaURLJSONexample.key;
8 return fetchFigmaFile(apiToken, fileKey);
9})();
4export const imBored = async () => {
5 return (boredActivities = fetchJSON(
6 "https://www.boredapi.com/api/activity"
7 ));
8};
3// GitHub followers
4export let githubFollowers = fetchJSON(
5 "https://api.github.com/users/stevekrouse/followers"
6);
1export function myApi(name) {
2 return "hi " + name;
3}
3
4export let friendIds = twitterJSON({
5 url: `https://api.twitter.com/1.1/friends/ids.json?screen_name=stevekrouse`,
6 bearerToken: twitterCredentials.bearerToken
7}).then(x => x.ids)
1import { hexToUtf8 } from "https://esm.town/v/ryanwaits/hexToUtf8";
2
3export const satsNameApi = async (req: Request) => {
4 const { Hono } = await import("npm:hono");
5 const app = new Hono();
6 let events = [];
7 app.post("/api/events", async (c) => {
8 const body = await c.req.json();
9 const { apply } = body;
1export function myApi(name) {
2 return "hi " + name;
3}
1// Copied from https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/digest
2export const sha256 = async function digestMessage(message) {
3 const msgUint8 = new TextEncoder().encode(message); // encode as (utf-8) Uint8Array
1export function myApi(name) {
2 return "hi " + name;
3}