1export function myApi(name) {
2 return "hi " + name;
3}
3export let quote = (async () => {
4 const quotes = await fetchJSON(
5 "https://zenquotes.io/api/random/"
6 );
7 return `"${quotes[0].q}" – ${quotes[0].a}`;
3export let initialCommit = async (org, repo) => {
4 const repoData = await fetchJSON(
5 `https://api.github.com/repos/${org}/${repo}`
6 );
7 const { created_at } = repoData;
8 const until = new Date(Date.parse(created_at) + 600).toISOString();
9 const json = await fetchJSON(
10 `https://api.github.com/repos/${org}/${repo}/commits?until=${until}`
11 );
12 return json;
7 const url = "https://blog.samaltman.com/how-to-be-successful";
8 const res = await fetch(
9 "https://extractus.deno.dev/extract?apikey=rn0wbHos2e73W6ghQf705bdF&type=article&url=" +
10 url
11 );
1export function myApi(name) {
2 return "hi " + name;
3}
5 token: string;
6 error?: boolean;
7 source?: ("api" | "ui" | "interval" | "email")[];
8 since?: Date;
9 until?: Date;
35}> {
36 return fetchJSON(
37 "https://api.val.town/v1/me/runs?" + searchParams({
38 error: error?.toString(),
39 source: source,
1import { discordAPI } from "https://esm.town/v/stevekrouse/discordAPI";
2
3// https://discord.com/developers/docs/resources/user#get-current-user-guilds
4export let discordGetGuilds = ({token, tokenType}) => discordAPI({
5 token,
6 tokenType,
15export const mt = async (req, res) => {
16 const r = await fetchJSON(
17 "https://app.moderntreasury.com/api/user_onboardings",
18 {
19 method: "POST",
23 headers: await basicAuthorization(
24 process.env.mtOrganizationId,
25 process.env.mtApiKey,
26 ),
27 },
1export function myApi(name) {
2 return "hi " + name;
3}
1export function myApi(name) {
2 return "hi " + name;
3}