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%22Optional%20title%22?q=api&page=1497&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 17852 results for "api"(2123ms)

warningsmain.tsx3 matches

@nws•Updated 1 year ago
1import { API } from "https://esm.town/v/nws/api";
2
3export class Warnings {
4 endpoint: string
5
6 constructor(api: API) {
7 this.endpoint = api.url + `/alerts/active?status=actual&event=`;
8 }
9

apimain.tsx2 matches

@nws•Updated 1 year ago
1import { Warnings } from "https://esm.town/v/nws/warnings";
2
3export class API {
4 url: String
5 warnings: Warnings
6
7 constructor() {
8 this.url = "https://api.weather.gov";
9 this.warnings = new Warnings(this);
10 }

bicycleWeatherREADME.md1 match

@tyler71•Updated 1 year ago
1Upstream [/kingishb/blackLobster](https://www.val.town/v/kingishb/blackLobster)
2
3Why this one? Takes in a query string of lat, lon and timezone, returns a list of good biking days as an API response.
4
5

devtoolsmain.tsx2 matches

@pomdtr•Updated 1 year ago
1import { inferRequestVal } from "https://esm.town/v/andreterron/inferRequestVal";
2import { api } from "https://esm.town/v/pomdtr/api";
3
4export function devtools(handler: (req: Request) => Response | Promise<Response>, options?: {
23
24 if (pathname === "/_logs") {
25 const { id } = await api(`/v1/alias/${val.handle}/${val.name}`);
26 return Response.redirect(`https://www.val.town/settings/evaluations?val=${id}`);
27 }

sqliteExplorerAppREADME.md1 match

@zcribe•Updated 1 year 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

@zcribe•Updated 1 year ago
26 <head>
27 <title>SQLite Explorer</title>
28 <link rel="preconnect" href="https://fonts.googleapis.com" />
29
30 <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
31 <link
32 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"
33 rel="stylesheet"
34 />

templateModalTestmain.tsx1 match

@iamseeley•Updated 1 year ago
103 <path stroke-linecap="round" stroke-linejoin="round" d="M9 6.75V15m6-6v8.25m.503 3.498 4.875-2.437c.381-.19.622-.58.622-1.006V4.82c0-.836-.88-1.38-1.628-1.006l-3.869 1.934c-.317.159-.69.159-1.006 0L9.503 3.252a1.125 1.125 0 0 0-1.006 0L3.622 5.689C3.24 5.88 3 6.27 3 6.695V19.18c0 .836.88 1.38 1.628 1.006l3.869-1.934c.317-.159.69-.159 1.006 0l4.994 2.497c.317.158.69.158 1.006 0Z"></path>
104 </svg>
105 <div class="font-semibold group-hover:text-black">Web scraping</div>
106 </button>
107 <button class="group bg-gray-50 border-gray-300 flex items-center gap-2 overflow-hidden rounded border p-3 text-left transition-colors hover:border-blue-500 hover:shadow-md">

safeMessageBoardmain.tsx7 matches

@jahabeebs•Updated 1 year ago
5
6const app = new Hono();
7const apiKey = Deno.env.get("OPEN_MODERATOR_API_KEY");
8
9if (!apiKey) {
10 console.error("API key not set. Please set the OPEN_MODERATOR_API_KEY environment variable.");
11} else {
12 console.log("API key is set.");
13}
14
15const filter = new Filter({ openModeratorAPIKey: apiKey });
16
17app.get("/", (c) => {
106 // checkManualProfanityList is optional and defaults to false; it checks for the words in lang.ts (if under 50 words) before hitting the AI model. Note that this affects performance.
107 checkManualProfanityList: false,
108 // provider defaults to "google-perspective-api" (Google's Perspective API); it can also be "openai" (OpenAI Moderation API) or "google-natural-language-api" (Google's Natural Language API)
109 provider: "google-perspective-api",
110 };
111

tanLadybugmain.tsx7 matches

@stevekrouse•Updated 1 year ago
5
6const app = new Hono();
7const apiKey = Deno.env.get("OPEN_MODERATOR_API_KEY");
8
9if (!apiKey) {
10 console.error("API key not set. Please set the OPEN_MODERATOR_API_KEY environment variable.");
11} else {
12 console.log("API key is set.");
13}
14
15const filter = new Filter({ openModeratorAPIKey: apiKey });
16
17app.get("/", (c) => {
107 // checkManualProfanityList is optional and defaults to false; it checks for the words in lang.ts (if under 50 words) before hitting the AI model. Note that this affects performance.
108 checkManualProfanityList: false,
109 // provider defaults to "google-perspective-api" (Google's Perspective API); it can also be "openai" (OpenAI Moderation API) or "google-natural-language-api" (Google's Natural Language API)
110 provider: "google-perspective-api",
111 };
112

tanLadybugREADME.md1 match

@stevekrouse•Updated 1 year ago
6Future features will include moderation tools (auto-ban, bots), more powerful models, and multimedia support for video and audio moderation.
7
8To get an API key for the AI endpoints sign up free at https://www.openmoderator.com
9To install content-checker do `npm install content-checker` and check out the README: https://github.com/utilityfueled/content-checker
10

dailyQuoteAPI

@Souky•Updated 1 day ago

HTTP

@Ncharity•Updated 1 day ago
Daily Quote API
Kapil01
apiv1