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?q=api&page=989&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 12843 results for "api"(1435ms)

fetchAPImain.tsx4 matches

@pomdtrUpdated 11 months ago
1import { API_URL } from "https://esm.town/v/std/API_URL";
2
3export async function fetchAPI(
4 path: string,
5 options?: RequestInit & {
11 if (options?.paginate) {
12 const data = [];
13 let url = new URL(`${API_URL}${path}`);
14 url.searchParams.set("limit", "100");
15
42 }
43
44 return fetch(`${API_URL}${path}`, {
45 ...options,
46 headers: {

uploadImagemain.tsx1 match

@chriswmartinUpdated 11 months ago
24}
25async function getUploadURL(): Promise<string> {
26 const data = await (await fetch("https://www.val.town/api/trpc/generateImageUploadUrl", {
27 "headers": {
28 "content-type": "application/json",

blob_adminREADME.md1 match

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

textToImagePlaygroundREADME.md1 match

@iamseeleyUpdated 11 months ago
1## 🖼️ text to image playground using [fal.ai](https://fal.ai) model apis
2
3Migrated from folder: image_gen/textToImagePlayground

sqliteExplorerAppmain.tsx2 matches

@iamseeleyUpdated 11 months ago
26 <head>
27 <title>SQLite Explorer</title>
28 <link rel="preconnect" href="https://fonts.googleapis.com" />
29
30 <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
31 <link
32 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"
33 rel="stylesheet"
34 />

sqliteExplorerAppREADME.md1 match

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

uploadThruFileIomain.tsx1 match

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

convertResumemain.tsx12 matches

@iamseeleyUpdated 11 months ago
86 }
87
88 /* API Key Input Styles */
89 #apiKeyInput {
90 display: none;
91 margin-top: 10px;
108 <div class="buttons">
109 <div class="hosting">
110 <input type="text" id="apiKeyInput" placeholder="Enter your Val Town API Key">
111 <button id="hostButton">Host Resume on Val Town</button>
112 </div>
122 event.preventDefault();
123 const resumeContent = document.getElementById('resumeContent').value;
124 const apiKey = '${Deno.env.get("OPENAI_API_KEY")}';
125 const spinner = document.getElementById('spinner');
126 const jsonOutput = document.getElementById('jsonOutput');
127 const copyButton = document.getElementById('copyButton');
128 const hostButton = document.getElementById('hostButton');
129 const apiKeyInput = document.getElementById('apiKeyInput');
130
131 spinner.style.display = 'block';
133 copyButton.style.display = 'none';
134 hostButton.style.display = 'none';
135 apiKeyInput.style.display = 'none';
136
137 try {
138 const jsonResume = await convertToResumeJSON(resumeContent, apiKey);
139 jsonOutput.textContent = JSON.stringify(JSON.parse(jsonResume), null, 2);
140 copyButton.style.display = 'block';
141 hostButton.style.display = 'block';
142 apiKeyInput.style.display = 'block';
143 } catch (error) {
144 jsonOutput.textContent = 'An error occurred while converting the resume.';
153 document.getElementById('hostButton').addEventListener('click', async function() {
154 const jsonOutput = document.querySelector('#jsonOutput').innerText;
155 const valTownApiKey = document.getElementById('apiKeyInput').value; // Get the Val Town API key from input
156
157 if (!valTownApiKey) {
158 alert('Please enter your Val Town API Key.');
159 return;
160 }
161
162 try {
163 const hostedUrl = await hostResume(JSON.parse(jsonOutput), valTownApiKey);
164 alert('Resume hosted at: ' + hostedUrl);
165 window.open(hostedUrl, '_blank');

blobAdminREADME.md1 match

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

hostResumemain.tsx5 matches

@iamseeleyUpdated 11 months ago
1export async function hostResume(jsonResume, apiKey) {
2 const userDetailsEndpoint = 'https://api.val.town/v1/me/';
3 const createValEndpoint = 'https://api.val.town/v1/vals/';
4
5 // get user details
7 method: 'GET',
8 headers: {
9 'Authorization': `Bearer ${apiKey}`
10 }
11 });
22 method: 'POST',
23 headers: {
24 'Authorization': `Bearer ${apiKey}`,
25 'Content-Type': 'application/json'
26 },

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