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/$%7Bart_info.art.src%7D?q=api&page=959&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 12322 results for "api"(2429ms)

gsheet_callREADME.md3 matches

@ynonp•Updated 1 year ago
1# gsheet_call
2Wrapper around Google Sheets API v4.
3
4## Parameters
6- sheet_id: Google Sheet ID
7- method: HTTP method to use
8- action: Full URL with `https://sheets.googleapis.com/v4/spreadsheets/{spreadsheetId}/` removed
9- data: HTTP request body
10
11## Requirements
12- a Google Cloud service account
13- the Google Sheets API v4 enabled in your Google Cloud project
14- the spreadsheet ID (provide it in the sheet_id parameter)
15

aqiREADME.md1 match

@erosai•Updated 1 year ago
8
91. Click `Fork`
102. Change `location` (Line 4) to describe your location. It accepts fairly flexible English descriptions which it turns into locations via [nominatim's geocoder API](https://www.val.town/v/stevekrouse/nominatimSearch).
113. Click `Run`
12

dailyDadJokemain.tsx1 match

@LukieKang•Updated 1 year ago
3
4export async function dailyDadJoke() {
5 let { setup, punchline } = await fetchJSON("https://official-joke-api.appspot.com/random_joke");
6 return email({
7 text: punchline,

dailyDadJokeREADME.md2 matches

@LukieKang•Updated 1 year ago
113. 🤣🤣🤣🤣
12
13## API
14
15This val uses the [icanhazdadjoke API](https://icanhazdadjoke.com/api). You can find [more docs here](https://github.com/15Dkatz/official_joke_api), such as how to [filter by type](https://github.com/15Dkatz/official_joke_api?tab=readme-ov-file#grab-jokes-by-type).

langchainExmain.tsx1 match

@weaverwhale•Updated 1 year ago
7 const model = new OpenAI({
8 temperature: 0.9,
9 openAIApiKey: process.env.openai,
10 maxTokens: 100,
11 }, {});

myApimain.tsx1 match

@jamesyin•Updated 1 year ago
1export function myApi(name) {
2 return "hi " + name;
3}

pushNotemain.tsx4 matches

@dandivelbiss•Updated 1 year ago
1// Login into the Notehub API with a programmatic access client ID and client secret
2// Returns the api token to be used for subsequent requests
3const authenticate = async (): Promise<string> => {
4 const body = new URLSearchParams();
23 const token = await authenticate();
24 const res = await fetch(
25 `https://api.notefile.net/v1/projects/${projectUID}/devices/${deviceUID}/notes/${fileName}`,
26 {
27 method: "POST",
34 );
35 if (res.ok) return true;
36 throw new Error("Failed to push note to Notehub API");
37 } catch (e) {
38 console.log(e);

checkin_aliyunpanmain.tsx2 matches

@yieldray•Updated 1 year ago
72}
73
74async function getAccessTokenWithValTown(valTownAPIKey?: string): Promise<string> {
75 if (valTownAPIKey) Deno.env.set("valtown", valTownAPIKey);
76 const { blob } = await import("https://esm.town/v/std/blob");
77 const KEY = "aliyunpan-checkin";

MusicAPI2main.tsx3 matches

@nishui•Updated 1 year ago
10 }
11 console.log(id);
12 console.log(`https://music.163.com/api/v3/song/detail?id=${id}&c=[{"id":"${id}"}]`);
13
14 var uri = `https://music.163.com/api/v3/song/detail?id=${id}&c=[{"id":"${id}"}]`;
15 var encodedUri = encodeURI(uri);
16
21 [data1, data2] = await Promise.all([
22 fetch(encodedUri),
23 fetch(`https://music.163.com/api/song/media?id=${id}`),
24 ]);
25

upload_urlmain.tsx1 match

@stevekrouse•Updated 1 year ago
1// Function to upload data using Wormhole API and return the URL
2async function uploadToFileIo(file) {
3 const formData = new FormData();

social_data_api_project3 file matches

@tsuchi_ya•Updated 2 days ago

simple-scrabble-api1 file match

@bry•Updated 5 days ago
api
aquapi