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/$1?q=api&page=1475&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 17496 results for "api"(5758ms)

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();

modifyImageREADME.md1 match

@stevekrouse•Updated 1 year ago
1Code from https://deno.com/blog/build-image-resizing-api
2
3Useful for compressing an image before sending to chatgpt4v, for example

modifyImageREADME.md1 match

@stevekrouse•Updated 1 year ago
1Code from https://deno.com/blog/build-image-resizing-api
2
3Useful for compressing an image before sending to chatgpt4v, for example

GistGPT_Clientmain.tsx4 matches

@weaverwhale•Updated 1 year ago
16 GistGPT
17 </h1>
18 <p class="mb-4">Client for the <a class="underline" target="_blank" href="https://www.val.town/v/weaverwhale/GistGPT">GistGPT API</a></p>
19 <p class="mb-4">Provide a RAW file URL from Github, BitBucket, GitLab, Val Town, etc. and GistGPT will provide you the gist of the code.</p>
20 <input
22 placeholder="Provide a raw gist link here"
23 />
24 <p class="my-4">Have it summarize <a class="inline-block underline cursor-pointer" id="summarize-this">this file</a>, or <a class="inline-block underline cursor-pointer" id="summarize-api">the API's file</a> and it will explain how it works 🤯</p>
25 </body>
26 <script>
27 document.getElementById("summarize-api").addEventListener("click", (e) => {
28 e.target.disabled = true;
29 window.location.href = "/gist?url=https://esm.town/v/weaverwhale/GistGPT";
30 document.querySelector("input").value = "Summarizing the API\'s file...";
31 })
32

PriestGPTClientmain.tsx1 match

@mjweaver01•Updated 1 year ago
15 PriestGPT
16 </h1>
17 <p class="mb-4">Client for the <a class="underline" href="https://www.val.town/v/mjweaver01/PriestGPT">PriestGPT API</a></p>
18 <p class="mb-4">Ask him about books or verses in the bible, and he will be sure to give you a short sermon about it!</p>
19 <input

blob_adminREADME.md1 match

@curtcox•Updated 1 year ago
9[![Install](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

RandomQuoteAPI

@Freelzy•Updated 16 hours ago

HAPI7 file matches

@dIgitalfulus•Updated 21 hours ago
Kapil01
apiv1