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/image-url.jpg%20%22Image%20title%22?q=api&page=40&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 21386 results for "api"(3838ms)

scratchk8s-alerts.tsx6 matches

@maxm•Updated 6 days ago
18 path: "deployment";
19 type: string;
20 apiObj: {
21 kind: "Deployment";
22 };
24 path: "pod";
25 type: string;
26 apiObj: {
27 kind: "Pod";
28 status: {
66) {
67 if (payload.path === "pod") {
68 const containerStatus = payload.apiObj.status.containerStatuses?.at(0);
69 if (
70 payload.path === "pod" &&
71 payload.apiObj.metadata.deletionTimestamp === undefined &&
72 (containerStatus && "terminated" in containerStatus.state &&
73 containerStatus.state.terminated.exitCode !== 0)
75 await email({
76 subject: `Container terminated`,
77 text: `${payload.apiObj.metadata.labels["commit-hash"]} ${
78 JSON.stringify(payload.apiObj.status, null, 2)
79 }`,
80 });

Sonarneynar.ts4 matches

@moe•Updated 6 days ago
1const NEYNAR_API_KEY = Deno.env.get('NEYNAR_API_KEY') || 'NEYNAR_API_DOCS'
2const headers = {
3 'Content-Type': 'application/json',
4 'x-api-key': NEYNAR_API_KEY,
5}
6
7export const fetchNeynarGet = async (path: string) => {
8 return await fetch('https://api.neynar.com/v2/farcaster/' + path, {
9 method: 'GET',
10 headers: headers,
13
14export const fetchNeynarPost = async (path: string, body: any) => {
15 return await fetch('https://api.neynar.com/v2/farcaster/' + path, {
16 method: 'POST',
17 headers: headers,

sqlite_adminREADME.md1 match

@shriharip•Updated 6 days ago
9To use it on your own Val Town SQLite database, [fork it](https://www.val.town/v/stevekrouse/sqlite_admin/fork) to your account.
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
13Migrated from folder: utils/sqlite_admin/sqlite_admin

offlinemain.tsx2 matches

@cashlessman•Updated 6 days ago
13
14 const data = await response.json();
15 console.log("API Response:", data);
16 } catch (error) {
17 console.error("Error fetching API:", error);
18 }
19}

Linear-to-Slack-ReminderREADME.md5 matches

@juancrossmint•Updated 6 days ago
231. You'll need to these environment variables:
24 - `SLACK_BOT_TOKEN` - Your Slack bot token (see Step 2 below)
25 - `LINEAR_API_KEY` - Your Linear API key (see Step 3 below)
26
27### Step 2: Create and Configure Slack App
28
291. Go to [api.slack.com/apps](https://api.slack.com/apps) and click **"Create
30 New App"**
312. Choose **"From scratch"** and name it (e.g., "Linear Reminder Bot")
58 - **Request URL:** `https://[YOUR-VALTOWN-URL]/slack/interactive`
59
60### Step 3: Get Your Linear API Key
61
621. Open Linear and click your profile picture
632. Go to **Settings** → **Account** → **Security & access**
64 - Direct link: `https://linear.app/YOUR-WORKSPACE/settings/account/security`
653. Under **"Personal API keys"**, click **"New API key"**
664. Name it something memorable (e.g., "Val Town Slack Reminder Bot")
675. Give it full permissions and team access for easiest set up
686. **Copy the key immediately** - you won't be able to see it again!
697. Add it to Val Town as the `LINEAR_API_KEY` environment variable
70
71## Usage Guide
1import { WebClient } from "https://esm.sh/@slack/web-api@7.0.2";
2import { SlackUser } from "./types.ts";
3
7
8import { createReminder, updateReminder } from "../backend/database.ts";
9import { getLinearTicket } from "../backend/linearApi.ts";
10import { SlackModalPayload } from "../backend/types.ts";
11

Linear-to-Slack-ReminderlinearApi.ts2 matches

@juancrossmint•Updated 6 days ago
3
4const linearClient = new LinearClient({
5 apiKey: Deno.env.get("LINEAR_API_KEY") ?? (() => {
6 throw new Error("Missing required env var: LINEAR_API_KEY");
7 })(),
8});

vectorsserver.tsx2 matches

@jxnblk•Updated 6 days ago
14const app = new Hono();
15
16// api server
17app.get("/api", async (c) => {
18 return c.json({ hello: "hi" });
19});

reactHonoStarterindex.ts2 matches

@dhrv•Updated 6 days ago
12app.get("/frontend/**/*", c => serveFile(c.req.path, import.meta.url));
13
14// Add your API routes here
15// app.get("/api/data", c => c.json({ hello: "world" }));
16
17// Unwrap and rethrow Hono errors as the original error

custom-domains-val-api

@nbbaier•Updated 24 mins ago

custom-domains-val-api

@stevekrouse•Updated 1 hour ago
fiberplane
Purveyors of Hono tooling, API Playground enthusiasts, and creators of 🪿 HONC 🪿 (https://honc.dev)
api