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=1442&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 17453 results for "api"(2492ms)

sendSMSmain.tsx1 match

@nmsilva•Updated 11 months ago
3
4const sendEmail = async (email: any, subject: string, message: string) => {
5 const resend = new Resend(Deno.env.get("resendApiKey"));
6
7 if (email) {

sqliteExplorerAppREADME.md1 match

@amotivv•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

@amotivv•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 />

createValVersionmain.tsx1 match

@neverstew•Updated 11 months ago
27}> {
28 return fetchJSON(
29 `https://api.val.town/v1/vals/${valId}/versions`,
30 {
31 headers: {

pingNationsmain.tsx1 match

@bohaska•Updated 11 months ago
17 console.log("Starting...");
18 let response = await fetch(
19 `https://www.nationstates.net/cgi-bin/api.cgi?nation=${nations[i]}&q=issues`,
20 {
21 headers: myHeaders,

pingNationsREADME.md2 matches

@bohaska•Updated 11 months ago
3Requires:
4- Huggingface token (HF_TOKEN) for the sentiment analysis of options. Generate a read-only token at [Huggingface](https://huggingface.co/settings/tokens) after making an account to use.
5- Email address (EMAIL) for user agent. Required as per [NationStates ToS](tionstates.net/pages/api.html#terms)
6- Autologin token (AUTOLOGIN) for logging into NationStates. See [NationStates API docs](https://www.nationstates.net/pages/api.html#authenticating) for more info.
7- Nation name (NATION_ID). Put your nation name, the one you use when you login to your account.
8

blob_adminREADME.md1 match

@amotivv•Updated 11 months ago
9[![](https://stevekrouse-button.express.val.run/Install)](https://www.val.town/v/stevekrouse/blob_admin_app/fork)
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
13# TODO

nationstatesSentimentAImain.tsx3 matches

@bohaska•Updated 11 months ago
11async function query(data) {
12 const response = await fetch(
13 "https://api-inference.huggingface.co/models/cardiffnlp/twitter-roberta-base-sentiment-latest",
14 {
15 headers: { Authorization: `Bearer ${Deno.env.get("HF_TOKEN")}` },
34 console.log("Starting...");
35 let response = await fetch(
36 `https://www.nationstates.net/cgi-bin/api.cgi?nation=${Deno.env.get("NATION_ID")}&q=issues`,
37 {
38 headers: myHeaders,
71
72 let execute_issue = await fetch(
73 `https://www.nationstates.net/cgi-bin/api.cgi?nation=${
74 Deno.env.get("NATION_ID")
75 }&c=issue&issue=${issue_id}&option=${selected_option}`,

test_explorer_routermain.tsx5 matches

@maxm•Updated 11 months ago
1/** @jsxImportSource npm:hono/jsx */
2
3import { api } from "https://esm.town/v/pomdtr/api";
4import { extractValInfo } from "https://esm.town/v/pomdtr/extractValInfo";
5import { Island } from "https://esm.town/v/pomdtr/hono_island";
17const router = new Hono();
18
19const me = await api("/v1/me", { authenticated: true });
20const author = me.username;
21
57});
58
59router.post("/api/refresh", async () => {
60 const tests = await loadTests();
61
65async function loadTests(): Promise<TestType[]> {
66 const query = `https://esm.town/v/${author}/test_explorer`;
67 const { data: vals } = await api(`/v1/search/vals?query=${query}`, { authenticated: true });
68 const tests = {};
69 for (const val of vals) {
103}
104
105router.post("/api/run", async (c) => {
106 const body = await c.req.json();
107 try {

routermain.tsx4 matches

@maxm•Updated 11 months ago
1/** @jsxImportSource npm:hono/jsx */
2
3import { api } from "https://esm.town/v/pomdtr/api";
4import { extractValInfo } from "https://esm.town/v/pomdtr/extractValInfo";
5import { Island } from "https://esm.town/v/pomdtr/hono_island";
56});
57
58router.post("/api/refresh", async () => {
59 const tests = await loadTests();
60
64async function loadTests(): Promise<TestType[]> {
65 const query = `https://esm.town/v/${author}/test_explorer`;
66 const { data: vals } = await api(`/v1/search/vals?query=${query}`, { authenticated: true });
67 const tests = {};
68 for (const val of vals) {
102}
103
104router.post("/api/run", async (c) => {
105 const body = await c.req.json();
106 try {

RandomQuoteAPI

@Freelzy•Updated 14 hours ago

HAPI7 file matches

@dIgitalfulus•Updated 19 hours ago
Kapil01
apiv1