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/$%7Bsuccess?q=api&page=1624&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 18286 results for "api"(5357ms)

untitled_B7XzWEHMmain.tsx1 match

@stevekrouse•Updated 1 year ago
3export const untitled_B7XzWEHM = (
4 await fetch(
5 "https://api.val.town/v1/run/paulsun.parkingSpots" +
6 `?args=${JSON.stringify([lat, lng, radius])}`
7 )

geoffreyFollowsmain.tsx1 match

@stevekrouse•Updated 1 year ago
3
4export let geoffreyFollows = twitterJSON({
5 url: `https://api.twitter.com/1.1/friends/ids.json?screen_name=geoffreylitt`,
6 bearerToken: twitterCredentials.bearerToken
7}).then(x => x.ids)

runAllTests2main.tsx2 matches

@stevekrouse•Updated 1 year ago
1import { TEST_API } from "https://esm.town/v/stevekrouse/TEST_API";
2import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
3
4export async function runAllTests2({ names }: { names: string[] }) {
5 return names.map((name) =>
6 fetchJSON(`${TEST_API}/eval/@stevekrouse.${name}()`)
7 .then(({ data, error }) => (data ?? error?.message) + ` (${name})`)
8 );

myApimain.tsx1 match

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

catFactmain.tsx1 match

@yuval_dikerman•Updated 1 year ago
8 "Rewrite this fact about cats as if it was written for 3 year old:\n\n" +
9 fact;
10 const story = await fetch("https://api.openai.com/v1/chat/completions", {
11 method: "POST",
12 body: JSON.stringify({

myApimain.tsx1 match

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

myApimain.tsx1 match

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

getAllNotionDbRowsmain.tsx1 match

@supersayan•Updated 1 year ago
12 return await axios({
13 method: "POST",
14 url: `https://api.notion.com/v1/databases/${databaseId}/query`,
15 headers: {
16 Authorization: `Bearer ${notionAccessToken}`,

aqimain.tsx1 match

@colinz•Updated 1 year ago
4 let pm25 = (
5 await fetchJSON(
6 "https://api.openaq.org/v2/latest?" +
7 new URLSearchParams({
8 limit: "10",

slackappmain.tsx3 matches

@nate•Updated 1 year ago
5//
6// Setup: Add a slash command using
7// "https://api.val.town/express/@nate.slackapp" as the request URL.
8//
9// Usage: /yourcommandname {expression}
16
17 if (
18 !("api_app_id" in req.body) ||
19 req.body.api_app_id !== process.env.SLACK_API_APP_ID ||
20 !("text" in req.body) ||
21 !("response_url" in req.body)

github-api1 file match

@cricks_unmixed4u•Updated 15 hours ago

beeminder-api4 file matches

@cricks_unmixed4u•Updated 15 hours ago
Kapil01
apiv1