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=968&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 11604 results for "api"(1276ms)

myApimain.tsx1 match

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

arenaApiExamplemain.tsx2 matches

@tmcwUpdated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export let arenaApiExample = (async () => {
4 const resp = await fetch(
5 "http://api.are.na/v2/channels/that-glassy-dark-design-style",
6 );
7 const json = await resp.json();

runGETmain.tsx1 match

@stevekrouseUpdated 1 year ago
2
3export let runGET = fetchJSON(
4 `https://api.val.town/v1/run/stevekrouse.add?args=${JSON.stringify([1, 2])}`,
5);
4 testMutateSemantics({
5 stateName: "@stevekrouse.testState",
6 api: "localhost:3001",
7 mutateExpected: true,
8 mutator: (now) => `@steveVT.mutateTestState(${now})`,

spotifyAPImain.tsx2 matches

@stevekrouseUpdated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
2
3export let spotifyAPI = ({token, endpoint, ...params}) => fetchJSON(
4 `https://api.spotify.com/v1/${endpoint}?${new URLSearchParams(params)}`,
5 {
6 headers: { Authorization: `Bearer ${token}` },

runPOSTmain.tsx1 match

@stevekrouseUpdated 1 year ago
2
3export let runPOST = fetchJSON(
4 `https://api.val.town/v1/run/stevekrouse.add`,
5 {
6 method: "POST",

errorNotifymain.tsx1 match

@stevekrouseUpdated 1 year ago
8 token: process.env.valtown,
9 error: true,
10 source: ["api", "interval", "email"],
11 since: interval.lastRunAt,
12 });
15 const llm = new ChatOpenAI({
16 modelName: "gpt-3.5-turbo",
17 openAIApiKey: process.env.OPENAI_API_KEY,
18 temperature: 0,
19 });

myApimain.tsx1 match

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

myApimain.tsx1 match

@treblegniUpdated 1 year ago
1export function myApi(name) {
2 const random = Math.random(100);
3 return {

new-val-api-21 file match

@shouserUpdated 11 hours ago
This is an example of using the API to create a val.

gptApiTemplate2 file matches

@charmaineUpdated 1 day ago
papimark21
socialdata
Affordable & reliable alternative to Twitter API: ➡️ Access user profiles, tweets, followers & timeline data in real-time ➡️ Monitor profiles with nearly instant alerts for new tweets, follows & profile updates ➡️ Simple integration