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=469&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 5113 results for "api"(543ms)

receiveEmailAndConvertToPDFmain.tsx4 matches

@tmcw•Updated 1 year ago
3
4/**
5 * This requires a free API token from browserless.io saved in your
6 * Env Variables as BROWSERLESS_API_KEY
7 */
8let sendPDF = async (subject, html) => {
9 const browserlessApi = Deno.env.get("BROWSERLESS_API_KEY");
10 const browser = await puppeteer.connect({
11 browserWSEndpoint: `wss://chrome.browserless.io?token=${browserlessApi}`,
12 });
13 const page = await browser.newPage();

untitled_redEarthwormmain.tsx2 matches

@tmcw•Updated 1 year ago
2
3export default async () => {
4 const browserlessApi = Deno.env.get("BROWSERLESS_API_KEY");
5 const browser = await puppeteer.connect({
6 browserWSEndpoint: `wss://chrome.browserless.io?token=${browserlessApi}`,
7 });
8 const page = await browser.newPage();

dbToAPImain.tsx2 matches

@nbbaier•Updated 1 year ago
1/** @jsxImportSource https://esm.sh/hono@3.9.2/jsx **/
2
3import { Homepage } from "https://esm.town/v/nbbaier/dbToAPIFrontend";
4import { checkResource, getResources, type Options, validate } from "https://esm.town/v/nbbaier/dbToApiHelpers";
5import { Hono } from "npm:hono";
6

API_URLmain.tsx2 matches

@std•Updated 1 year ago
2 // try/catch prevents crashes if the script doesn't have env access
3 try {
4 return Deno.env.get("VALTOWN_API_URL");
5 } catch {}
6}
7
8export const API_URL = envOrUndefined("VALTOWN_API_URL") ?? "https://api.val.town";

remarkmain.tsx3 matches

@stevekrouse•Updated 1 year ago
10 <style>
11 {`
12 @import url(https://fonts.googleapis.com/css?family=Droid+Serif);
13 @import url(https://fonts.googleapis.com/css?family=Yanone+Kaffeesatz);
14 @import url(https://fonts.googleapis.com/css?family=Ubuntu+Mono:400,700,400italic);
15
16 body {

updateValByIDmain.tsx1 match

@nbbaier•Updated 1 year ago
20 };
21
22 return fetchJSON(`https://api.val.town/v1/vals/${valId}`, {
23 headers: {
24 Authorization: `Bearer ${token}`,

updateValByNamemain.tsx1 match

@nbbaier•Updated 1 year ago
14 };
15
16 return fetchJSON("https://api.val.town/v1/vals", {
17 headers: {
18 Authorization: `Bearer ${token}`,

spotify_helpersmain.tsx1 match

@stevekrouse•Updated 1 year ago
35 </li>
36 <li>If your access token expires, we use the refresh token to get a new one.</li>
37 <li>Use your access token to make requests to the Spotify API.</li>
38 </ol>
39

spotify_helpersREADME.md1 match

@stevekrouse•Updated 1 year ago
1Migrated from folder: External_APIs/spotify/spotify_helpers

spotifyRefreshTokenmain.tsx1 match

@stevekrouse•Updated 1 year ago
3
4export let spotifyRefreshToken = async ({ refresh_token, client_id, client_secret }) =>
5 fetchJSON("https://accounts.spotify.com/api/token", {
6 method: "POST",
7 body: await querystring({

runValAPIEx2 file matches

@charmaine•Updated 22 hours ago

PassphraseAPI2 file matches

@wolf•Updated 3 days ago
artivilla
founder @outapint.io vibe coding on val.town. dm me to build custom vals: https://artivilla.com
fiberplane
Purveyors of Hono tooling, API Playground enthusiasts, and creators of 🪿 HONC 🪿 (https://honc.dev)