1export function myApi(question, answer) {
2 return `${question}? - ${answer}`;
3}
1import { greet } from "https://esm.town/v/mik639/greet";
2
3export function myApi(name) {
4 console.email(greet(name), "Test email");
5}
1export function myApi(name) {
2 return "hi " + name;
3}
8 );
9 const result = await fetch(
10 "https://gateway.thegraph.com/api/6e951d2948be69a241891fb15ec9cefb/deployments/id/QmYN4ofRb5CUg1WdpLhhNTVCuiiAt29hBKGjTnnxYh9zYt",
11 {
12 "headers": {
5export let hasValTownStyleGuideUpdated = async (since: Date) => {
6 let commits = await fetchJSON(
7 "https://api.github.com/repos/val-town/val.town/commits?path=/src/style.tsx&since=" +
8 since.toISOString(),
9 {
4 const ics = await import("npm:ics");
5 const events = await fetch(
6 "https://a827-donatenyc.nyc.gov/DSNYApi/api/Events/GetAllByBorough?borough=",
7 )
8 .then((r) => r.json());
3export let chessTime = (async () => {
4 const { secondsToHours } = await import("npm:date-fns");
5 const stats = await fetch("https://lichess.org/api/user/tmcw").then((r) =>
6 r.json()
7 );
2
3export let unserializeableLogEx = (async () => {
4 const { Configuration, OpenAIApi } = await import("npm:openai");
5 const configuration = new Configuration({
6 apiKey: process.env.openai,
7 });
8 const openai = new OpenAIApi(configuration);
9 console.log(openai);
10})();
1import { testMutateSemantics } from "https://esm.town/v/stevekrouse/testMutateSemantics";
2
3export const unauthenticatedCantMutateThroughBadSetter = (api) =>
4 testMutateSemantics({
5 stateName: "@stevekrouse.testState",
6 api,
7 mutateExpected: false,
8 mutator: (now) => `@steveVT.mutateTestStateBad(${now})`,
1import { testMutateSemantics } from "https://esm.town/v/stevekrouse/testMutateSemantics";
2
3export const unauthenticatedCanMutateThroughSetter = (api) =>
4 testMutateSemantics({
5 stateName: "@stevekrouse.testState",
6 api,
7 mutateExpected: true,
8 mutator: (now) => `@stevekrouse.mutateTestState(${now})`,