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=990&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 12914 results for "api"(1645ms)

pingNationsmain.tsx1 match

@bohaskaUpdated 10 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

@bohaskaUpdated 10 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

@amotivvUpdated 10 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

@bohaskaUpdated 10 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

@maxmUpdated 10 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

@maxmUpdated 10 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 {

test_explorer_routermain.tsx4 matches

@pomdtrUpdated 10 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 {

test_explorerREADME.md1 match

@maxmUpdated 10 months ago
33
34In order to define a test, the user need to import the Test class from `https://val.town/v/<account>/Test`.
35So we can use the api to search for vals containing the `https://val.town/v/<account>/Test` string to locate the vals containing tests.
36
37Next, we need to extract the tests from the val exports. We use `exported instanceof Test` to filter them (at some point we will probably use static analysis for this).

dubLinkMakermain.tsx3 matches

@muxUpdated 10 months ago
6
7// Make sure to set these environment variables
8const token = Deno.env.get("DUB_API_KEY");
9const dubWorkspaceId = Deno.env.get("DUB_WORKSPACE_ID");
10const signingSecret = Deno.env.get("SLACK_MUX_LINK_SIGNING_SECRET");
57 // If the destination is `list`, return a list of all the existing short links
58 if (destination === "list") {
59 const req = await fetch(`https://api.dub.co/links?workspaceId=${dubWorkspaceId}`, {
60 headers: { Authorization: `Bearer ${token}`, "Content-Type": "application/json" },
61 });
84
85 try {
86 const resp = await fetch(`https://api.dub.co/links?workspaceId=${dubWorkspaceId}`, options).then(
87 response => response.json(),
88 );

nationstatesSentimentAIREADME.md2 matches

@bohaskaUpdated 10 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

vapi-minutes-db1 file match

@henrywilliamsUpdated 1 day ago

vapi-minutes-db2 file matches

@henrywilliamsUpdated 1 day ago
papimark21
socialdata
Affordable & reliable alternative to Twitter API: ➡️ Access user profiles, tweets, followers & timeline data in real-time ➡️ Monitor profiles with nearly instant alerts for new tweets, follows & profile updates ➡️ Simple integration