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/$%7Burl%7D?q=api&page=1005&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 12138 results for "api"(3727ms)

crux_addREADME.md1 match

@yieldrayUpdated 1 year ago
1Migrated from folder: api/crux_add

extractReceiptEndpointmain.tsx2 matches

@claywayUpdated 1 year ago
1import { callGoogleSheetsAPI } from "https://esm.town/v/clayway/callGoogleSheetsAPI";
2import { extractReceiptInfo } from "https://esm.town/v/clayway/extractReceiptInfo";
3import process from "node:process";
37 } = result;
38 try {
39 await callGoogleSheetsAPI({
40 sheetId: process.env.BUDGET_SHEET_ID,
41 serviceAccount: process.env.GOOGLE_SERVICE_ACCOUNT,

getRedditAccessTokenmain.tsx1 match

@tambreUpdated 1 year ago
13 `${process.env.reddit_client_id}:${process.env.reddit_client_secret}`,
14 ).toString("base64");
15 const response = await fetch("https://www.reddit.com/api/v1/access_token", {
16 method: "POST",
17 body: formData,

authenticateRedditmain.tsx1 match

@mschleskeUpdated 1 year ago
24
25 try {
26 response = await fetch("https://www.reddit.com/api/v1/access_token", {
27 headers: headers,
28 method: "POST",

valSignmain.tsx1 match

@easrngUpdated 1 year ago
11}) {
12 const topUser = whoami().at(-1).slice(1).split(".")[0];
13 const verifyPublicKey = await __utils__.api(topUser + ".vsPublicKey");
14 if (verifyPublicKey !== keys.publicKey)
15 throw new Error("keypair doesn't match @" + topUser + ".vsPublicKey()");

valSignVerifymain.tsx1 match

@easrngUpdated 1 year ago
7 const [handle, encodedSignedMessage] = matches.slice(1);
8 const publicKey = Buffer.from(
9 await __utils__.api(handle + ".vsPublicKey"),
10 "base64",
11 );

addShortlinkmain.tsx3 matches

@byjpUpdated 1 year ago
51 Accept: "application/vnd.github+json",
52 Authorization: req.get("Authorization"),
53 "X-GitHub-Api-Version": "2022-11-28",
54 };
55 const path = `https://api.github.com/repos/${shortlink_repo}/contents/public/_redirects`;
56 const getRes = await fetch(path, {
57 method: "GET",
84 headers,
85 body: JSON.stringify({
86 message: `Adding '${shortlink}' shortlink via API`,
87 content: Buffer.from(redirects).toString("base64"),
88 sha,

getValREADME.md1 match

@stevekrouseUpdated 1 year ago
2Gets information about a specific val.
3
4To access private vals, pass your API token as a secret to the function. Read more about [authentication](https://docs.val.town/api/authentication) to understand how to generate a token and save it as a secret.
5
6Migrated from folder: Archive/getVal

btoamain.tsx1 match

@stevekrouseUpdated 1 year ago
1// https://developer.mozilla.org/en-US/docs/Web/API/btoa
2import { Buffer } from "node:buffer";
3

callGoogleSheetsAPImain.tsx3 matches

@claywayUpdated 1 year ago
7 data: object;
8};
9export async function callGoogleSheetsAPI(
10 { serviceAccount, sheetId, action, data }: Args,
11) {
14 );
15 const googleAuthOptions = {
16 scope: ["https://www.googleapis.com/auth/spreadsheets"],
17 };
18 const { access_token } = await getToken(serviceAccount, googleAuthOptions);
19 const result = fetchJSON(
20 `https://sheets.googleapis.com/v4/spreadsheets/${sheetId}/${action}`,
21 {
22 method: "POST",

groq-vapi-demo1 file match

@yawnxyzUpdated 3 hours ago

social_data_api_project3 file matches

@tsuchi_yaUpdated 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