1export function myApi(name) {
2 return "hi " + name;
3}
3export let queryTwitter = (query: string) => {
4 return twitterRequest(
5 `https://api.twitter.com/2/tweets/search/recent?query=${query}&tweet.fields=created_at`
6 );
7};
3// Predict the nationality of a name
4export let nameNationality = fetchJSON(
5 "https://api.nationalize.io/?name=michael"
6);
31 ],
32 headers: {
33 "X-GitHub-Api-Version": "2022-11-28",
34 },
35 });
3// GitHub events
4export let githubEvents = fetchJSON(
5 "https://api.github.com/users/stevekrouse/events",
6);
3// Github profile
4export let githubUser = fetchJSON(
5 "https://api.github.com/users/stevekrouse"
6);
2
3export let eval_ = (code, args?) =>
4 fetchJSON("https://api.val.town/v1/eval", {
5 method: "POST",
6 body: JSON.stringify({
1import { runVal } from "https://esm.town/v/std/runVal";
2
3export const rimeAPIEx = await runVal("stevekrouse.rime", {
4 text: "hello friend",
5 speaker: "young_female_latina-4",
7 for (let i = 0; i < count; i++) {
8 let start = Date.now();
9 await fetch("https://api.val.town/eval/(()=%3E1+1)()");
10 evalTimes.push(Date.now() - start);
11 }
22 for (let i = 0; i < count; i++) {
23 let start = Date.now();
24 await fetch("https://api.val.town/eval/@healeycodes.addOnes()");
25 userFuncTimes.push(Date.now() - start);
26 }
2
3export let bskySocialEx = (async () => {
4 const { default: api } = await import("npm:@atproto/api");
5 const service = "https://bsky.social";
6 const agent = await new api.BskyAgent({ service });
7 await agent.login({
8 identifier: process.env.blueskyEmail,