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=5&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 11482 results for "api"(1618ms)

Telegram bot544 words

https://docs.val.town/integrations/telegram/
url from req.url. // This is a no-op if nothing's changed. if (!isEndpointSet) { await bot.api.setWebhook(req.url, { secret_token: SECRET_TOKEN, }); isEndpointSet = true; } if (req.method === "POST") { return

Sections

2. Create a webhook handler to receive messages

url from req.url. // This is a no-op if nothing's changed. if (!isEndpointSet) { await bot.api.setWebhook(req.url, { secret_token: SECRET_TOKEN, }); isEndpointSet = true; } if (req.method === "POST") { return

TownieChatRoute.tsx2 matches

@std•Updated 2 hours ago
63 refetch: () => void;
64}) {
65 const { token, anthropicApiKey } = useAuth();
66 const [images, setImages] = useState<(string|null)[]>([]);
67 const [selectedFiles, setSelectedFiles] = useState<string[]>([]);
81 project,
82 branchId,
83 anthropicApiKey,
84 bearerToken: token,
85 selectedFiles,

LEDStrain-Discussion-To-PlainTextapp.tsx2 matches

@tyler71•Updated 2 hours ago
81async function getDiscussionPosts(discussionId: string): Promise<PostT[]> {
82 // Used to get the list of post id's for the discussion.
83 const discussionRes = await fetch(`${server}/api/discussions/${discussionId}`);
84 const discussionResJson = await discussionRes.json();
85
93
94 await Promise.all(chunks.map(async (c: string[]) => {
95 const postRes = await fetch(`${server}/api/posts?filter[id]=${c.join(",")}`);
96 const postJson = await postRes.json();
97

gptApiTemplate2 file matches

@charmaine•Updated 3 hours ago

mod-interview-api1 file match

@twschiller•Updated 19 hours ago
apiv1
papimark21