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=34&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 15376 results for "api"(2356ms)

Glancer3RemixpollEnabledStatus.ts1 match

@stevekrouse•Updated 1 day ago
6 const pinger = setInterval(async () => {
7 // check the boolean to see if a Glancer has enabled the link to start a cobrowsing session
8 const resp = await fetch("/api/cobrowse/" + window.__DEMO_ID__, {
9 method: "GET",
10 headers: {

Glancer3RemixINSTRUCTIONS.md1 match

@stevekrouse•Updated 1 day ago
37- Hono /backend/routes, including
38 - index.ts and what it does, and the routing strategy it establishes, including
39 - /api routes for serving JSON and other content to views
40 - /view routes for serving the demo at /demo/:id/
41 - /task routes for handling Notion webhooks

Glancer3Remixindex.tsx5 matches

@stevekrouse•Updated 1 day ago
13}
14
15interface ApiErrorResponse {
16 message: string;
17 status: string | number;
18}
19
20export type DemoData = NotionPage | ApiErrorResponse;
21
22// Type guards
23export function isApiError(data: DemoData): data is ApiErrorResponse {
24 return 'message' in data && 'status' in data;
25}
60 }
61
62 // If no initial data, fetch it from the API
63 const demoId = window.__DEMO_ID__ || getDemoIdFromPath();
64 if (demoId && demoId !== 'demo') {
65 try {
66 const response = await fetch(`/api/demo/${demoId}`);
67 const data = await response.json();
68 return {

Glancer3Remixindex.ts2 matches

@stevekrouse•Updated 1 day ago
7
8// Import route modules
9import api from "./routes/api/api.ts";
10import auth from "./routes/auth.ts";
11import root from "./routes/root.ts";
33
34// Mount route modules
35app.route("/api", api);
36app.route("/tasks", tasks);
37app.route("/demo", demo);

Glancer3Remixindex.html1 match

@stevekrouse•Updated 1 day ago
8 <script src="https://cdn.tailwindcss.com"></script>
9 <link
10 href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap"
11 rel="stylesheet"
12 />

Glancer3RemixgetPage.ts1 match

@stevekrouse•Updated 1 day ago
3// Initialize Notion client
4const notion = new Client({
5 auth: Deno.env.get("NOTION_API_KEY"),
6});
7

Glancer3RemixgetDatabase.ts1 match

@stevekrouse•Updated 1 day ago
3// Initialize Notion client
4const notion = new Client({
5 auth: Deno.env.get("NOTION_API_KEY"),
6});
7

Glancer3RemixgetActions.ts1 match

@stevekrouse•Updated 1 day ago
3// Initialize Notion client
4const notion = new Client({
5 auth: Deno.env.get("NOTION_API_KEY"),
6});
7

Glancer3RemixenrichAgent.ts1 match

@stevekrouse•Updated 1 day ago
3// Initialize Notion client
4const notion = new Client({
5 auth: Deno.env.get("NOTION_API_KEY"),
6});
7

Glancer3Remixdemo.ts5 matches

@stevekrouse•Updated 1 day ago
5} from "https://esm.town/v/std/utils/index.ts";
6import { Hono } from "npm:hono";
7import { examplePDF } from "../../api/servePDF.ts";
8import { getPage } from "../../../controllers/getPage.ts";
9
31 let html = await readFile("/frontend/index.html", import.meta.url);
32
33 // Use the /demo API endpoint to get data
34 const apiUrl = new URL(c.req.url);
35 apiUrl.pathname = `/api/demo/${id}`;
36
37 const response = await fetch(apiUrl.toString());
38 const initialData = await response.json();
39

HN-fetch-call2 file matches

@ImGqb•Updated 1 day ago
fetch HackerNews by API

token-server1 file match

@kwhinnery_openai•Updated 3 days ago
Mint tokens to use with the OpenAI Realtime API for WebRTC
Kapil01
apiv1