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=989&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 11410 results for "api"(1591ms)

gitHubStarsmain.tsx2 matches

@vtdocs•Updated 1 year ago
4 const username = "stevekrouse";
5 const user = await fetchJSON(
6 `https://api.github.com/users/${username}`,
7 );
8 let totalStars = 0;
11 while (pages--) {
12 const repositories = await fetchJSON(
13 `https://api.github.com/users/${username}/repos?per_page=100&page=${
14 pages + 1
15 }`,

wrapInHTMLElementsmain.tsx1 match

@rwev•Updated 1 year ago
1export function wrapInHTMLElements(
2 elements: string | string[],
3 html: string

girafemain.tsx1 match

@dot•Updated 1 year ago
9
10 let response = await fetch(
11 `https://www.sevenrooms.com/api-yoa/availability/widget/range?venue=${venue}&time_slot=${time_slot}&party_size=${party_size}&halo_size_interval=5&start_date=${start_date}&num_days=1&channel=SEVENROOMS_WIDGET`
12 );
13 let body = await response.json();

valtownOpenAPImain.tsx4 matches

@pomdtr•Updated 1 year ago
1import { openapi2TS } from "https://esm.town/v/pomdtr/openapi2TS";
2
3export async function valtownOpenAPI(req: Request) {
4 return new Response(
5 await openapi2TS(
6 "https://www.val.town/docs/openapi.yaml",
7 ),
8 {

listValsmain.tsx2 matches

@pomdtr•Updated 1 year ago
30 }
31 const resp = await fetch(
32 `https://api.val.town/v1/search/vals?query=${query}`,
33 );
34 if (!resp.ok) {
63 case "view-val": {
64 const { id } = args;
65 const resp = await fetch(`https://api.val.town/v1/vals/${id}`);
66 if (!resp.ok) {
67 return resp;

myApimain.tsx1 match

@tmcw_onboarding•Updated 1 year ago
1export function myApi(name) {
2 return "hi " + name;
3}

mathFactmain.tsx1 match

@hultner•Updated 1 year ago
3// Random math fact
4export let mathFact = fetchText(
5 "http://numbersapi.com/random/math"
6);

myApimain.tsx1 match

@joemccourt•Updated 1 year ago
1export function myApi(name) {
2 return "hi " + name + " fobar";
3}

myApimain.tsx1 match

@tychio•Updated 1 year ago
1export function myApi(name) {
2 return "hi " + name;
3}

myApimain.tsx1 match

@bacondotbuild•Updated 1 year ago
1export function myApi(name) {
2 return "hi " + name;
3}

mod-interview-api1 file match

@twschiller•Updated 7 hours ago

daily-advice-app1 file match

@dcm31•Updated 3 days ago
Random advice app using Advice Slip API
apiv1
papimark21