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/$%7Burl%7D?q=api&page=1499&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 18048 results for "api"(1420ms)

cronEvalLoggermain.tsx2 matches

@neverstew•Updated 11 months ago
1import { inTheBackground } from "https://esm.town/v/neverstew/inTheBackground";
2import { API_URL } from "https://esm.town/v/std/API_URL?v=5";
3import { sqlite } from "https://esm.town/v/std/sqlite?v=6";
4import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=45";
26 headers["Authorization"] = `Bearer ${token}`;
27 }
28 const { id } = await fetchJSON(`${API_URL}/v1/alias/${userHandle}/${valName}`, { headers });
29
30 const createCronEvalsTable = `CREATE TABLE IF NOT EXISTS cron_evals (

libsqlstudioREADME.md1 match

@neverstew•Updated 11 months ago
3![3fe0fa827f4c3b6e4efcce501182ffcaab898a6f8fb9e12ef44ee25e8e438ded.png](https://imagedelivery.net/iHX6Ovru0O7AjmyT5yZRoA/815d9eae-0333-45a2-1ca5-b7e08aec8300/public)
4
5To authenticate, use an [API Token](https://www.val.town/settings/api).

libsqlstudioREADME.md1 match

@steve_test_gpt•Updated 11 months ago
3![3fe0fa827f4c3b6e4efcce501182ffcaab898a6f8fb9e12ef44ee25e8e438ded.png](https://imagedelivery.net/iHX6Ovru0O7AjmyT5yZRoA/815d9eae-0333-45a2-1ca5-b7e08aec8300/public)
4
5To authenticate, use an [API Token](https://www.val.town/settings/api).

sqliteExplorerAppREADME.md1 match

@hunty•Updated 11 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

@hunty•Updated 11 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 />

sendNotificationREADME.md1 match

@doublelotus•Updated 11 months ago
1# Push Notification Sender
2
3This val can be used in other vals to send notifications to a segment using [OneSignal's REST API](https://documentation.onesignal.com/reference/create-notification)
4
5This is really handy if you want to send push notifications to your phone without building a native app! I built a barebones React PWA that asks for a password then loads the OneSignal Web SDK that I deployed to [Netlify](https://www.netlify.com/) for free. OneSignal has [easy to follow docs](https://documentation.onesignal.com/docs/web-sdk-setup) so you can build this functionality into a React, Angular, Vue app or even Wordpress! Then [install the PWA](https://www.bitcot.com/how-to-install-a-pwa-to-your-device/) on your platform of choice and you're off to the races!

automergeDemomain.tsx1 match

@stevekrouse•Updated 11 months ago
7
8export default async function(req: Request): Promise<Response> {
9 // from https://automerge.org/automerge/api-docs/js/
10 type DocType = { ideas: Array<automerge.Text> };
11

nasaImageDetailsmain.tsx1 match

@wallek•Updated 11 months ago
2
3export const nasaImageDetails = async () => {
4 const nasaAPOD = await fetchJSON("https://api.nasa.gov/planetary/apod?api_key=DEMO_KEY");
5 let nasaImageHtml = nasaAPOD.hdurl
6 ? `<img width="100%" src="${nasaAPOD.hdurl}"/>`

qdrantmain.tsx7 matches

@dglazkov•Updated 11 months ago
3 "Access-Control-Allow-Methods": "GET,HEAD,PUT,PATCH,POST,DELETE",
4 "Access-Control-Allow-Headers":
5 "Content-Type, Access-Control-Allow-Headers, api-key",
6 "Access-Control-Max-Age": "2592000", // 30 days
7} as Record<string, string>;
15 const path = url.pathname;
16 const params = url.searchParams;
17 const apiKey = req.headers.get("api-key");
18 if (!apiKey) {
19 throw new Error("Missing API key");
20 }
21 const savedKey = Deno.env.get("QDRANT_API_KEY");
22 if (savedKey && apiKey !== savedKey) {
23 throw new Error("Invalid API key");
24 }
25 if (!params.has("cluster_id")) {

qdrantREADME.md4 matches

@dglazkov•Updated 11 months ago
1Since [Qdrant Cloud](https://qdrant.tech/cloud/) has a fairly strict CORS policy, here's a simple val that proxies calls to Qdrant Cloud API and makes them accessible from Web apps.
2
3 To set up:
4- fork this val
5- add your `QDRANT_API_KEY` to your environment variables. This would limit usage of your proxy to your API key only.
6- start using val as a proxy
7
8Use it as a 1:1 replacement for Qdrant API, except for one additional query string parameter:
9- `cluster_id` -- the part of the Qdrant API endpoint before `cloud.qdrant.io`.

Apiify11 file matches

@wolf•Updated 8 hours ago

dailyQuoteAPI

@Souky•Updated 2 days ago
Kapil01
apiv1