1import { exportedKeys } from "https://esm.town/v/stevekrouse/exportedKeys";
2import { thisEmail } from "https://esm.town/v/stevekrouse/thisEmail";
3import { runValAPIAuth } from "https://esm.town/v/stevekrouse/runValAPIAuth";
4
5export const emailEx = runValAPIAuth({
6 val: "@stevekrouse.email",
7 args: [{
8 subject: "test via api",
9 from: { email: thisEmail() },
10 to: [{ email: "steve@val.town" }],
7}) {
8 return fetchJSON(
9 "https://api.openai.com/v1/fine_tuning/jobs",
10 {
11 method: "POST",
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
2
3export function resend({ from, to, subject, html, text, apiKey }: {
4 from: string;
5 to: string;
7 html?: string;
8 text?: string;
9 apiKey: string;
10}) {
11 return fetchJSON("https://api.resend.com/emails", {
12 method: "POST",
13 headers: {
14 "Authorization": `Bearer ${apiKey}`,
15 "Content-Type": "application/json",
16 },
1let { valTownInspoList } = await import("https://esm.town/v/rodrigotello/valTownInspoList?v=99");
2import { isValTownTeam } from "https://esm.town/v/stevekrouse/isValTownTeam";
3import { verifyAPIAuth } from "https://esm.town/v/stevekrouse/verifyAPIAuth";
4
5export async function updateInspoList(newList, auth) {
6 let handle = await verifyAPIAuth(auth);
7 if (isValTownTeam(handle)) {
8 valTownInspoList = newList;
3
4export let autoGPT_Test2 = (async () => {
5 const { Configuration, OpenAIApi } = await import("npm:openai");
6 const configuration = new Configuration({
7 apiKey: process.env.openai,
8 });
9 const openai = new OpenAIApi(configuration);
10 const completion = await openai.createChatCompletion({
11 model: "gpt-3.5-turbo",
1import { testMutateSemantics } from "https://esm.town/v/stevekrouse/testMutateSemantics";
2
3export const authenticatedCanMutateAnotherSetter = (api) =>
4 testMutateSemantics({
5 stateName: "@steveVT.myTestState",
6 api,
7 mutateExpected: true,
8 mutator: (now) => `@steveVT.mutateMyState(${now})`,
5 const { default: axios } = await import("npm:axios");
6 const url =
7 "https://sapphire.api.microsoftapp.net/config/api/v1/get?setmkt=en-us&setplatform=android&setchannel=production&settenant=sapphire-bing";
8 try {
9 const response = await fetch(url, {
5sending an email each time. I'm using this to send this information
6to an RSVP sheet. */
7export let weddingAPI = (guest, yesno, count, additional, email) => {
8 const gsheet_append_example = gsheet_call(
9 process.env.google_service_account, // This is the file you download from the service account in Google. Just paste it in.
1import { myApi as myApi2 } from "https://esm.town/v/parweb/myApi";
2
3export function myApi(name) {
4 return myApi2("chris");
5}
2
3// Send a pushover message.
4// token, user, and other opts are as specified at https://pushover.net/api
5export async function pushover({ token, user, message, title, url, ...opts }) {
6 return await fetch("https://api.pushover.net/1/messages.json", {
7 method: "POST",
8 body: JSON.stringify({