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/$%7Bart_info.art.src%7D?q=api&page=1419&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 18281 results for "api"(6262ms)

qualityBrownTyrannosaurusmain.tsx1 match

@natsa•Updated 6 months ago
47 ],
48 projects: [
49 { text: "API REST básica", completed: false },
50 { text: "Servidor de archivos", completed: false },
51 { text: "Sistema de autenticación simple", completed: false },

email_jokemain.tsx1 match

@kswang06•Updated 6 months ago
4async function fetchRandomJoke() {
5 const response = await fetch(
6 "https://official-joke-api.appspot.com/random_joke",
7 );
8 return response.json();

blob_adminREADME.md1 match

@danfishgold•Updated 6 months ago
11[![](https://stevekrouse-button.web.val.run/Install)](https://www.val.town/v/stevekrouse/blob_admin_app/fork)
12
13It 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).
14
15# TODO

blobREADME.md2 matches

@bons•Updated 6 months ago
75```
76
77### Lower-level API
78
79We provide access to the lower-level getter and setters,
82
83* `async get(key: string)`: Retrieves a blob for a given key.
84* `async set(key: string, value: string | BodyInit)`: Sets the blob value for a given key. See [BodyInit](https://deno.land/api@v1.38.1?s=BodyInit).
85
86### Limitations

blobmain.tsx5 matches

@bons•Updated 6 months ago
1import { API_URL } from "https://esm.town/v/std/API_URL";
2import { ValTownBlobError } from "https://esm.town/v/std/ValTownBlobError";
3import { ValTownBlobNotFoundError } from "https://esm.town/v/std/ValTownBlobNotFoundError";
82async function list(prefix?: string): Promise<{ key: string; size: number; lastModified: string }[]> {
83 let querystring = prefix ? `?prefix=${encodeURIComponent(prefix)}` : "";
84 const res = await fetch(`${API_URL}/v1/blob${querystring}`, {
85 headers: {
86 Authorization: `Bearer ${Deno.env.get("valtown")}`,
95
96async function delete_(key: string) {
97 const res = await fetch(`${API_URL}/v1/blob/${encodeURIComponent(key)}`, {
98 method: "DELETE",
99 headers: {
108
109async function get(key: string) {
110 const res = await fetch(`${API_URL}/v1/blob/${encodeURIComponent(key)}`, {
111 headers: {
112 Authorization: `Bearer ${Deno.env.get("valtown")}`,
124
125async function set(key: string, value: BodyInit) {
126 const res = await fetch(`${API_URL}/v1/blob/${encodeURIComponent(key)}`, {
127 method: "POST",
128 headers: {

sqliteExplorerAppmain.tsx2 matches

@lecoto•Updated 6 months ago
155 <head>
156 <title>SQLite Explorer</title>
157 <link rel="preconnect" href="https://fonts.googleapis.com" />
158 <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
159 <link
160 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"
161 rel="stylesheet"
162 />

sqliteExplorerAppREADME.md1 match

@lecoto•Updated 6 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

blob_adminREADME.md1 match

@lecoto•Updated 6 months ago
11[![](https://stevekrouse-button.web.val.run/Install)](https://www.val.town/v/stevekrouse/blob_admin_app/fork)
12
13It 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).
14
15# TODO

blob_adminREADME.md1 match

@bons•Updated 6 months ago
11[![](https://stevekrouse-button.web.val.run/Install)](https://www.val.town/v/stevekrouse/blob_admin_app/fork)
12
13It 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).
14
15# TODO

modernSalesCRMmain.tsx5 matches

@shrirudragoud•Updated 6 months ago
84 const timeoutId = setTimeout(() => controller.abort(), 5000);
85
86 const response = await fetch('/api/leads', {
87 signal: controller.signal
88 });
107 const timeoutId = setTimeout(() => controller.abort(), 5000);
108
109 const response = await fetch('/api/leads', {
110 method: 'POST',
111 headers: { 'Content-Type': 'application/json' },
236 }
237
238 // Handle API routes with timeout
239 if (request.method === 'GET' && new URL(request.url).pathname === '/api/leads') {
240 try {
241 const leads = await sqlite.execute(`SELECT * FROM ${KEY}_leads ORDER BY created_at DESC LIMIT 100`);
253 }
254
255 if (request.method === 'POST' && new URL(request.url).pathname === '/api/leads') {
256 try {
257 const lead = await request.json();

github-api1 file match

@cricks_unmixed4u•Updated 14 hours ago

beeminder-api4 file matches

@cricks_unmixed4u•Updated 14 hours ago
Kapil01
apiv1