Val Town Code SearchReturn to Val Town

API Access

You can access search results via JSON API by adding format=json to your query:

https://codesearch.val.run/$%7Bart_info.art.src%7D?q=api&page=1050&format=json

For typeahead suggestions, use the /typeahead endpoint:

https://codesearch.val.run/typeahead?q=api

Returns an array of strings in format "username" or "username/projectName"

Found 11504 results for "api"(3310ms)

emailExmain.tsx3 matches

@stevekrouse•Updated 1 year ago
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" }],

openaiFineTunemain.tsx1 match

@stevekrouse•Updated 1 year ago
7}) {
8 return fetchJSON(
9 "https://api.openai.com/v1/fine_tuning/jobs",
10 {
11 method: "POST",

resendmain.tsx4 matches

@stevekrouse•Updated 1 year ago
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 },

updateInspoListmain.tsx2 matches

@stevekrouse•Updated 1 year ago
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;

autoGPT_Test2main.tsx3 matches

@stevekrouse•Updated 1 year ago
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})`,

testAndroidBingAppsmain.tsx1 match

@xuangong•Updated 1 year ago
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, {

weddingAPImain.tsx1 match

@schwanksta•Updated 1 year ago
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.

myApimain.tsx3 matches

@parweb•Updated 1 year ago
1import { myApi as myApi2 } from "https://esm.town/v/parweb/myApi";
2
3export function myApi(name) {
4 return myApi2("chris");
5}

pushovermain.tsx2 matches

@meatcar•Updated 1 year ago
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({

gptApiTemplate2 file matches

@charmaine•Updated 13 hours ago

mod-interview-api1 file match

@twschiller•Updated 1 day ago
apiv1
papimark21