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=637&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 12043 results for "api"(1400ms)

remasterbackendmain.tsx2 matches

@tempdevUpdated 3 months ago
46 extractedURL: "",
47 accessHeaders: {
48 Referer: `https://rapidplayers.com/e/${id}`,
49 },
50 fromCache: false,
53 storyboard: [],
54 };
55 const baseUrl = "https://rapidplayers.com";
56 const embed = await Fetcher(`${baseUrl}/e/${id}`, baseUrl);
57 const pr = /p}\('(.*?)',(\d+),(\d+),'(.*?)'\.split/gm;

primewireUtilsmain.tsx2 matches

@tempdevUpdated 3 months ago
3import { getLinks } from "https://esm.town/v/tempdev/blue";
4import {
5 primewireApiKey,
6 primewireBase,
7} from "https://raw.githubusercontent.com/Ciarands/mw-providers/dev/src/providers/sources/primewire/common.ts";
8
9async function search(imdbId: string) {
10 const searchResult = await fetch(`${primewireBase}/api/v1/show?key=${primewireApiKey}&imdb_id=${imdbId}`);
11 return await searchResult.json().then((searchResult) => {
12 return searchResult.id;

sqliteExplorerAppREADME.md1 match

@caizoryanUpdated 3 months ago
13## Authentication
14
15Login to your SQLite Explorer with [password authentication](https://www.val.town/v/pomdtr/password_auth) with your [Val Town API Token](https://www.val.town/settings/api) as the password.
16
17## Todos / Plans

sqliteExplorerAppmain.tsx2 matches

@caizoryanUpdated 3 months ago
27 <head>
28 <title>SQLite Explorer</title>
29 <link rel="preconnect" href="https://fonts.googleapis.com" />
30
31 <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
32 <link
33 href="https://fonts.googleapis.com/css2?family=Fira+Code:wght@300..700&family=Source+Sans+3:ital,wght@0,200..900;1,200..900&display=swap"
34 rel="stylesheet"
35 />

weatherBasedActivityAlertingmain.tsx5 matches

@mattwd7Updated 3 months ago
10const precipitationUnit = Deno.env.get("WEATHER_PRECIPITATION_UNIT") || "inch";
11const timezone = Deno.env.get("WEATHER_TIMEZONE") || "America/Los_Angeles";
12// Activity weather criteria definitions using Open-Meteo API daily weather keys
13// All daily weather keys listed at https://open-meteo.com/en/docs
14const activities = {
51 const metrics = extractUniqueMetrics(activities);
52
53 // Construct API URL with dynamic metrics
54 const forecastUrl = new URL("https://api.open-meteo.com/v1/forecast");
55 forecastUrl.searchParams.set("latitude", latitude.toString());
56 forecastUrl.searchParams.set("longitude", longitude.toString());
65
66 if (!forecastResponse.ok) {
67 throw new Error(`Weather API request failed: ${forecastResponse.statusText}`);
68 }
69
73 metrics.forEach(metric => {
74 if (!forecast.daily[metric]) {
75 throw new Error(`Requested metric ${metric} not found in API response`);
76 }
77 });

blob_adminmain.tsx25 matches

@yeikoUpdated 3 months ago
73 const menuRef = useRef(null);
74 const isPublic = blob.key.startsWith("__public/");
75 const publicUrl = isPublic ? `${window.location.origin}/api/public/${encodeURIComponent(blob.key.slice(9))}` : null;
76
77 useEffect(() => {
237 setLoading(true);
238 try {
239 const response = await fetch(`/api/blobs?prefix=${encodeKey(searchPrefix)}&limit=${limit}`);
240 const data = await response.json();
241 setBlobs(data);
264 setBlobContentLoading(true);
265 try {
266 const response = await fetch(`/api/blob?key=${encodeKey(clickedBlob.key)}`);
267 const content = await response.text();
268 setSelectedBlob({ ...clickedBlob, key: decodeKey(clickedBlob.key) });
278 const handleSave = async () => {
279 try {
280 await fetch(`/api/blob?key=${encodeKey(selectedBlob.key)}`, {
281 method: "PUT",
282 body: editContent,
290 const handleDelete = async (key) => {
291 try {
292 await fetch(`/api/blob?key=${encodeKey(key)}`, { method: "DELETE" });
293 setBlobs(blobs.filter(b => b.key !== key));
294 if (selectedBlob && selectedBlob.key === key) {
307 const key = `${searchPrefix}${file.name}`;
308 formData.append("key", encodeKey(key));
309 await fetch("/api/blob", { method: "POST", body: formData });
310 const newBlob = { key, size: file.size, lastModified: new Date().toISOString() };
311 setBlobs([newBlob, ...blobs]);
329 try {
330 const fullKey = `${searchPrefix}${key}`;
331 await fetch(`/api/blob?key=${encodeKey(fullKey)}`, {
332 method: "PUT",
333 body: "",
344 const handleDownload = async (key) => {
345 try {
346 const response = await fetch(`/api/blob?key=${encodeKey(key)}`);
347 const blob = await response.blob();
348 const url = window.URL.createObjectURL(blob);
363 if (newKey && newKey !== oldKey) {
364 try {
365 const response = await fetch(`/api/blob?key=${encodeKey(oldKey)}`);
366 const content = await response.blob();
367 await fetch(`/api/blob?key=${encodeKey(newKey)}`, {
368 method: "PUT",
369 body: content,
370 });
371 await fetch(`/api/blob?key=${encodeKey(oldKey)}`, { method: "DELETE" });
372 setBlobs(blobs.map(b => b.key === oldKey ? { ...b, key: newKey } : b));
373 if (selectedBlob && selectedBlob.key === oldKey) {
383 const newKey = `__public/${key}`;
384 try {
385 const response = await fetch(`/api/blob?key=${encodeKey(key)}`);
386 const content = await response.blob();
387 await fetch(`/api/blob?key=${encodeKey(newKey)}`, {
388 method: "PUT",
389 body: content,
390 });
391 await fetch(`/api/blob?key=${encodeKey(key)}`, { method: "DELETE" });
392 setBlobs(blobs.map(b => b.key === key ? { ...b, key: newKey } : b));
393 if (selectedBlob && selectedBlob.key === key) {
402 const newKey = key.slice(9); // Remove "__public/" prefix
403 try {
404 const response = await fetch(`/api/blob?key=${encodeKey(key)}`);
405 const content = await response.blob();
406 await fetch(`/api/blob?key=${encodeKey(newKey)}`, {
407 method: "PUT",
408 body: content,
409 });
410 await fetch(`/api/blob?key=${encodeKey(key)}`, { method: "DELETE" });
411 setBlobs(blobs.map(b => b.key === key ? { ...b, key: newKey } : b));
412 if (selectedBlob && selectedBlob.key === key) {
557 onClick={() =>
558 copyToClipboard(
559 `${window.location.origin}/api/public/${encodeURIComponent(selectedBlob.key.slice(9))}`,
560 )}
561 className="text-blue-400 hover:text-blue-300 text-sm"
580 >
581 <img
582 src={`/api/blob?key=${encodeKey(selectedBlob.key)}`}
583 alt="Blob content"
584 className="max-w-full h-auto"
660
661// Public route without authentication
662app.get("/api/public/:id", async (c) => {
663 const key = `__public/${c.req.param("id")}`;
664 const { blob } = await import("https://esm.town/v/std/blob");
766};
767
768app.get("/api/blobs", checkAuth, async (c) => {
769 const prefix = c.req.query("prefix") || "";
770 const limit = parseInt(c.req.query("limit") || "20", 10);
775});
776
777app.get("/api/blob", checkAuth, async (c) => {
778 const key = c.req.query("key");
779 if (!key) return c.text("Missing key parameter", 400);
783});
784
785app.put("/api/blob", checkAuth, async (c) => {
786 const key = c.req.query("key");
787 if (!key) return c.text("Missing key parameter", 400);
792});
793
794app.delete("/api/blob", checkAuth, async (c) => {
795 const key = c.req.query("key");
796 if (!key) return c.text("Missing key parameter", 400);
800});
801
802app.post("/api/blob", checkAuth, async (c) => {
803 const { file, key } = await c.req.parseBody();
804 if (!file || !key) return c.text("Missing file or key", 400);

valTownInspoListmain.tsx1 match

@rodrigotelloUpdated 3 months ago
101 "title": "Save HTML Form Data",
102 "description":
103 "Submit forms to Val Town using the Express API. <a href=\"https://docs.val.town/guides/save-html-form-data/\">Read full guide</a>.",
104 "val": "@vtdocs.renderFormAndSaveData",
105 image:

valTownInspoListmain.tsx1 match

@charmaineUpdated 3 months ago
101 "title": "Save HTML Form Data",
102 "description":
103 "Submit forms to Val Town using the Express API. <a href=\"https://docs.val.town/guides/save-html-form-data/\">Read full guide</a>.",
104 "val": "@vtdocs.renderFormAndSaveData",
105 image:

woffToTtfConvertermain.tsx1 match

@gUpdated 3 months ago
14 <meta charset="UTF-8">
15 <meta name="viewport" content="width=device-width, initial-scale=1.0">
16 <link rel="icon" href="https://api.iconify.design/fluent-emoji:ab-button-blood-type.svg">
17 <title>Font Converter</title>
18 <link rel="stylesheet" href="/styles.css">

foundationmain.tsx1 match

@allUpdated 3 months ago
162
163const css = `
164@import url('https://fonts.googleapis.com/css2?family=Courier+Prime:wght@400;700&family=Playfair+Display:wght@600&display=swap');
165
166:root {

social_data_api_project3 file matches

@tsuchi_yaUpdated 19 hours ago

simple-scrabble-api1 file match

@bryUpdated 4 days 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