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%22Optional%20title%22?q=api&page=93&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 12982 results for "api"(848ms)

hdindex.html5 matches

@quartex•Updated 4 days ago
70 <li>Data-driven insights for better decision making</li>
71 <li>Optimization of honey production through precise monitoring</li>
72 <li>Reduced travel costs for beekeepers with multiple apiaries</li>
73 <li>Historical data collection for long-term colony management</li>
74 </ul>
128 </p>
129 <ul class="list-disc pl-6 mt-2">
130 <li><strong>WiFi:</strong> For apiaries with reliable WiFi access</li>
131 <li><strong>Cellular (3G/4G/5G):</strong> For remote locations without WiFi</li>
132 <li><strong>LoRaWAN:</strong> Low-power, long-range wireless technology ideal for rural areas</li>
135 </ul>
136 <p class="mt-2">
137 The choice depends on the location of your apiary, power availability, and the specific smart hive system you're using.
138 </p>
139 </div>
263 <li><strong>Mid-range systems:</strong> $300-600 for multiple sensors and wireless connectivity</li>
264 <li><strong>Advanced systems:</strong> $600-1,500 for comprehensive monitoring with multiple sensor types</li>
265 <li><strong>Commercial systems:</strong> $1,500+ for professional-grade equipment for large apiaries</li>
266 </ul>
267 <p class="mt-2">
284 <ul class="list-disc pl-6 mt-2">
285 <li><strong>Commercial beekeepers:</strong> Often see significant ROI through reduced colony losses, optimized honey production, and decreased labor costs</li>
286 <li><strong>Hobbyists with remote apiaries:</strong> Can save on travel costs and time</li>
287 <li><strong>New beekeepers:</strong> May benefit from the learning opportunities and reduced risk of colony loss</li>
288 <li><strong>Research and education:</strong> Valuable for data collection and analysis</li>

test-multiembedt.tsx2 matches

@temptemp•Updated 4 days ago
8};
9export default async function(req: Request): Promise<Response> {
10 const API_URL: string = "https://api.val.town";
11 async function proxiedFetch(input: string | URL, requestInit?: RequestInit) {
12 let query = new URLSearchParams({
13 url: input.toString(),
14 });
15 return fetch(`${API_URL}/v1/fetch?${query}`, {
16 ...requestInit,
17 // @ts-ignore

untitled-5703index.ts11 matches

@angelaphiri•Updated 4 days ago
52});
53
54// API Routes
55const api = new Hono();
56
57// Jobs API
58api.get("/jobs", async c => {
59 const jobs = await getAllJobs();
60 return c.json(jobs);
61});
62
63api.get("/jobs/:id", async c => {
64 const id = parseInt(c.req.param("id"));
65 if (isNaN(id)) {
75});
76
77api.post("/jobs", async c => {
78 try {
79 const body = await c.req.json() as JobInput;
91});
92
93// Chat API
94api.get("/messages", async c => {
95 const limit = c.req.query("limit") ? parseInt(c.req.query("limit")) : 50;
96 const messages = await getMessages(limit);
98});
99
100api.post("/messages", async c => {
101 try {
102 const body = await c.req.json() as MessageInput;
114});
115
116// Mount API routes
117app.route("/api", api);
118
119// Export the app

untitled-5703index.js4 matches

@angelaphiri•Updated 4 days ago
134async function fetchJobs() {
135 try {
136 const response = await fetch('/api/jobs');
137 if (!response.ok) throw new Error('Failed to fetch jobs');
138
188 elements.submitJobButton.textContent = 'Posting...';
189
190 const response = await fetch('/api/jobs', {
191 method: 'POST',
192 headers: {
236async function fetchMessages() {
237 try {
238 const response = await fetch('/api/messages');
239 if (!response.ok) throw new Error('Failed to fetch messages');
240
292 };
293
294 const response = await fetch('/api/messages', {
295 method: 'POST',
296 headers: {

Mercurymercury.ts16 matches

@thirdsouth•Updated 4 days ago
2
3/**
4 * Mercury Bank API Client
5 *
6 * Documentation: https://docs.mercury.com/reference/api-reference
7 */
8export class MercuryClient {
9 private apiKey: string;
10 private baseUrl: string = 'https://api.mercury.com/api/v1';
11
12 constructor() {
13 const apiKey = Deno.env.get('MERCURY_API_KEY');
14 if (!apiKey) {
15 throw new Error('MERCURY_API_KEY environment variable is required');
16 }
17 this.apiKey = apiKey;
18 }
19
20 /**
21 * Make an authenticated request to the Mercury API
22 */
23 private async request<T>(
28 const url = `${this.baseUrl}${endpoint}`;
29 const headers = {
30 'Authorization': `Bearer ${this.apiKey}`,
31 'Content-Type': 'application/json',
32 };
50 if (!response.ok) {
51 const errorText = await response.text();
52 console.error(`Mercury API error (${response.status}):`, errorText);
53 throw new Error(`Mercury API error (${response.status}): ${errorText}`);
54 }
55
58 return data as T;
59 } catch (error) {
60 console.error('Error in Mercury API request:', {
61 message: error.message,
62 stack: error.stack,
72 async getAccounts(): Promise<MercuryAccount[]> {
73 try {
74 console.log('Fetching accounts from Mercury API');
75 // Try the documented endpoint structure first
76 const response = await this.request<{ accounts: MercuryAccount[] }>('/accounts');
129 console.log(`Fetching transactions for account ${accountId}, limit: ${limit}`);
130
131 // Try different endpoint formats to handle potential API variations
132 let endpoint = `/accounts/${accountId}/transactions?limit=${limit}`;
133 if (cursor) {
163 limit: number = 10
164 ): Promise<MercuryTransaction[]> {
165 // Note: This is a simplified implementation. Mercury's actual search API
166 // might have different parameters or structure.
167 const endpoint = `/transactions/search?q=${encodeURIComponent(query)}&limit=${limit}`;

Mercuryindex.ts2 matches

@thirdsouth•Updated 4 days ago
18 // In a production environment, you should verify the request signature
19 // using the Slack signing secret. For simplicity, we're skipping that here.
20 // https://api.slack.com/authentication/verifying-requests-from-slack
21
22 const slackSigningSecret = Deno.env.get('SLACK_SIGNING_SECRET');
82 cause: txError.cause
83 });
84 return formatErrorMessage(`API Error: ${txError.message}`);
85 }
86 } catch (error) {

beeAifrontend.html4 matches

@armadillomike•Updated 4 days ago
8 <script src="https://esm.town/v/std/catch"></script>
9 <style>
10 @import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&display=swap');
11
12 :root {
377
378 try {
379 // Send message to API
380 const response = await fetch('/api/chat', {
381 method: 'POST',
382 headers: {
444 try {
445 // Send request to generate image
446 const response = await fetch('/api/generate-image', {
447 method: 'POST',
448 headers: {

ZenChatindex.ts2 matches

@mehran•Updated 4 days ago
200}
201
202// API routes
203app.get("/api/messages", async (c) => {
204 try {
205 const messages = await getRecentMessages();

beeAiREADME.md6 matches

@armadillomike•Updated 4 days ago
13## How It Works
14
15BeeGPT uses OpenAI's API to generate responses and images, but adds a bee-themed personality layer through prompt engineering. The system includes:
16
171. A backend API that communicates with OpenAI
182. A bee-themed prompt that instructs the AI to respond with bee-related content
193. A bee-themed image generator that enhances prompts with bee elements
41- Tabbed interface for switching between chat and image generation
42
43## API Endpoints
44
45- `GET /` - Serves the frontend HTML
46- `POST /api/chat` - Accepts a JSON payload with a `message` field and returns an AI response
47- `POST /api/generate-image` - Accepts a JSON payload with `prompt` and optional `size` fields and returns an image URL
48
49## Environment Variables
50
51This project requires an OpenAI API key to be set in your Val Town environment variables.
52
53## License

syllabus-todogemini.ts2 matches

@rayyan•Updated 4 days ago
1import { GoogleGenAI, Type } from "npm:@google/genai";
2
3// Access your API key as an environment variable
4const ai = new GoogleGenAI({ apiKey: process.env.GEMINI_API_KEY });
5
6const _prompt = `Parse the Units and their topics from the provided image of syllabus by performing an OCR on the image

vapi-minutes-db1 file match

@henrywilliams•Updated 2 days ago

vapi-minutes-db2 file matches

@henrywilliams•Updated 2 days ago
snartapi
mux
Your friendly, neighborhood video API.