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=944&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 11989 results for "api"(1173ms)

trpcREADME.md1 match

@pomdtrUpdated 1 year ago
1# trpc
2
3 Access private Val Town apis.
4
5> ⚠️ trpc endpoints can change at any time

tapMochaToNodemain.tsx5 matches

@barelyhumanUpdated 1 year ago
53 const builder = recast.types.builders;
54
55 let tapImportIdentifier = "t";
56 const testUtils = [
57 "describe",
88 const specifier = path.node.specifiers[0];
89 if (specifier && specifier.local) {
90 tapImportIdentifier = specifier.local.name.toString();
91 }
92 return false;
96 recast.visit(ast, {
97 visitExpressionStatement(path) {
98 removeMochaGlobal(path as NodePath, tapImportIdentifier, {
99 asserts,
100 });
127function removeMochaGlobal(
128 path: NodePath,
129 tapImportIdentifier: string,
130 { asserts }: { asserts: typeof recast.types.namedTypes },
131) {
144
145 const calleeName = path.node.expression.callee.object.name;
146 if (calleeName !== tapImportIdentifier) {
147 return false;
148 }

vtOpenAPIREADME.md1 match

@stevekrouseUpdated 1 year ago
1null
2
3Migrated from folder: Archive/vtOpenAPI

vtOpenAPI_migratedREADME.md1 match

@stevekrouseUpdated 1 year ago
1Migrated from folder: Archive/vtOpenAPI

notehubREADME.md1 match

@rdimartinoUpdated 1 year ago
1# Notehub
2
3A set of helper functions for interacting with the Notehub API
4
5Requires `NOTEHUB_CLIENT_ID` and `NOTEHUB_CLIENT_SECRET` [environment variables](https://www.val.town/settings/environment-variables) to be configured.

citiesREADME.md1 match

@mxdvlUpdated 1 year ago
1Retrieve a city for a given coordinates in the format `[longitude, latitude]`.
2
3An `OPENCAGE_API_KEY` variable is necessary and can be [obtained for free on their website](https://opencagedata.com/pricing).
4
5Migrated from folder: geographic/cities

mdx_readmeREADME.md2 matches

@saolsenUpdated 1 year ago
5import msg from "https://esm.town/v/pomdtr/msg"
6
7import {capitalize} from "https://esm.sh/lodash-es"
8
9export const title = "mdx rendered from a val readme"
10
11# {capitalize(title)}
12
13> {msg}

mdx_readmeREADME.md2 matches

@pomdtrUpdated 1 year ago
5import msg from "https://esm.town/v/pomdtr/msg"
6
7import {capitalize} from "https://esm.sh/lodash-es"
8
9export const title = "mdx rendered from a val readme"
10
11# {capitalize(title)}
12
13> {msg}

cdnmain.tsx4 matches

@pomdtrUpdated 1 year ago
4
5async function createScreenshot(code: string) {
6 const apiUrl = "https://sourcecodeshots.com/api/image";
7 const resp = await fetch(apiUrl, {
8 method: "POST",
9 headers: {
39 }
40 }
41 const resp = await fetch(`https://api.val.town/v1/alias/${author}/${name}`, {
42 headers,
43 });
50 const version = url.searchParams.get("v");
51 const resp = await fetch(
52 `https://api.val.town/v1/vals/${val.id}/versions/${version}`,
53 { headers },
54 );

getValVersionmain.tsx1 match

@pomdtrUpdated 1 year ago
3console.log(
4 await fetchJSON(
5 `https://api.val.town/v1/vals/1f32d4c1-332e-4135-889f-8df408924a9d/versions/1`,
6 {
7 headers: {

social_data_api_project3 file matches

@tsuchi_yaUpdated 13 hours ago

simple-scrabble-api1 file match

@bryUpdated 2 days ago
mux
Your friendly, neighborhood video API.
api