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=1096&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 13864 results for "api"(1164ms)

twitterAlertREADME.md1 match

@sumukh•Updated 11 months ago
13Change the `query` variable for what you want to get notified for.
14
15You can use [Twitter's search operators](https://developer.twitter.com/en/docs/twitter-api/v1/rules-and-filtering/search-operators) to customize your query, for some collection of keywords, filtering out others, and much more!
16
17## 3. Notification

blob_adminREADME.md1 match

@charlypoly•Updated 11 months ago
9[![](https://stevekrouse-button.express.val.run/Install)](https://www.val.town/v/stevekrouse/blob_admin_app/fork)
10
11It uses [basic authentication](https://www.val.town/v/pomdtr/basicAuth) with your [Val Town API Token](https://www.val.town/settings/api) as the password (leave the username field blank).
12
13# TODO

aiHonoHtmxAlpineStreamingExampleREADME.md1 match

@yawnxyz•Updated 11 months ago
1This Frankenstein of an example shows how well Hono, htmx, and Alpine play together.
2- Hono serves the frameworks, API calls, and functions
3- htmx handles ajax requests, and can very powerfully request html and other content to swap out the front-end
4- alpine handles app-like reactivity without having to always resort to server round trips

redSwanmain.tsx1 match

@ianvph•Updated 11 months ago
24
25 capturePostHogEvent(
26 Deno.env.get("phProjectAPIKey"),
27 webhookPayload.sender.login,
28 "GitHub Star",

posthogGitHubStarCapturemain.tsx1 match

@ianvph•Updated 11 months ago
23
24 capturePostHogEvent(
25 Deno.env.get("phProjectAPIKey"),
26 webhookPayload.sender.login,
27 "GitHub Star",

posthogGitHubStarCapturemain.tsx1 match

@wallbreaker•Updated 11 months ago
23
24 capturePostHogEvent(
25 Deno.env.get("phProjectAPIKey"),
26 webhookPayload.sender.login,
27 "GitHub Star",

uploadImagemain.tsx1 match

@qqyule•Updated 11 months ago
24}
25async function getUploadURL(): Promise<string> {
26 const data = await (await fetch("https://www.val.town/api/trpc/generateImageUploadUrl", {
27 "headers": {
28 "content-type": "application/json",
15 }),
16 );
17 const dataReq = await fetch(`https://api.pinata.cloud/pinning/pinFileToIPFS`, {
18 method: "POST",
19 headers: {
28
29 const req = await fetch(
30 "https://api.pinata.cloud/data/pinList?metadata[keyvalues]={\"level\":{\"value\":\"200\",\"op\":\"eq\"}}",
31 {
32 method: "GET",

asciiNycCamerasmain.tsx3 matches

@maxm•Updated 11 months ago
196);
197app.get("/camera-ascii/:id", async (c) => {
198 const url = "https://webcams.nyctmc.org/api/cameras/" + c.req.param("id") + "/image";
199 const { stringColor } = await imageToAscii(url, 150);
200 return new Response(stringColor, { headers: { "Content-Type": "text/plain" } });
203 "/camera/:id",
204 async (c) => {
205 const url = "https://webcams.nyctmc.org/api/cameras/" + c.req.param("id") + "/image";
206 const { string, stringColor } = await imageToAscii(url, 150);
207 return new Response(
258app.get("/camera-text-stream/:id", async (c) => {
259 let timerId: number | undefined;
260 const url = "https://webcams.nyctmc.org/api/cameras/" + c.req.param("id") + "/image";
261 const body = new ReadableStream({
262 async start(controller) {

blackLobstermain.tsx3 matches

@kingishb•Updated 11 months ago
15
16// Takoma Park, MD weather forecast
17// https://weather-gov.github.io/api/gridpoints
18const NOAA_URL_TKPK = "https://api.weather.gov/gridpoints/LWX/97,75/forecast/hourly";
19
20interface Period {
52}
53
54// Sleep a random amount of seconds (to respect NOAA's API).
55async function sleepRand(seconds: number) {
56 const s = Math.random() * seconds * 1000;

new-val-api-demo

@shouser•Updated 10 hours ago
This is an example of using the API to create a val.

groq-api2 file matches

@cameronpak•Updated 14 hours ago
mux
Your friendly, neighborhood video API.
api