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/?q=api&page=479&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 5056 results for "api"(634ms)

unserializeableLogExmain.tsx3 matches

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

referencesmain.tsx1 match

@stevekrouse•Updated 1 year ago
24}[]> {
25 const res = await fetchJSON(
26 "https://api.val.town/v1/me/references?" +
27 searchParams({
28 since: since?.toISOString(),

testVTClient2main.tsx3 matches

@stevekrouse•Updated 1 year ago
1export const testVTClient2 = (async () => {
2 const { createApiClient } = await import(
3 "https://esm.sh/gh/nbbaier/valtown-zodios/src/spec/valtown-client.ts"
4 );
5 const apiClient = createApiClient("https://api.val.town");
6 const params = {
7 params: { username: "nbbaier", val_name: "hello" },
8 };
9 const user = await apiClient.getValname(params);
10 return user;
11})();

githubFollowingmain.tsx1 match

@stevekrouse•Updated 1 year ago
5export let githubFollowing =
6 (await fetchJSON(
7 "https://api.github.com/users/stevekrouse/following",
8 )).map((f) => f.login).map((h) => ({
9 h,

twitterFollowingsmain.tsx1 match

@stevekrouse•Updated 1 year ago
3
4export let twitterFollowings = async ({bearerToken, handle}) => twitterJSON({
5 url: `https://api.twitter.com/2/users/${(await twitterUser({bearerToken, handle})).data.id}/following`,
6 bearerToken
7})

emailAPImain.tsx2 matches

@stevekrouse•Updated 1 year ago
1export let emailAPI = () => {
2 throw new Error("This API has moved to @std.emailAPI.");
3};

unserializeableLogExmain.tsx3 matches

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

stevekrouseFollowingmain.tsx1 match

@stevekrouse•Updated 1 year ago
7 twitterJSON;
8 let resp = await fetchJSON(
9 `https://api.twitter.com/1.1/friends/ids.json?user_id=${userId}`,
10 {
11 headers: {

runValAPIEx2 file matches

@charmaine•Updated 11 hours ago

PassphraseAPI2 file matches

@wolf•Updated 3 days ago
artivilla
founder @outapint.io vibe coding on val.town. dm me to build custom vals: https://artivilla.com
fiberplane
Purveyors of Hono tooling, API Playground enthusiasts, and creators of 🪿 HONC 🪿 (https://honc.dev)