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=960&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 12884 results for "api"(1906ms)

githubactivitymain.tsx3 matches

@ejfoxUpdated 9 months ago
1// This approach uses the GitHub API without authentication, which is subject to rate limiting.
2// We'll fetch and process the GitHub activity data, and render it as a nicely designed website
3// using Vue for templating and Tailwind for styling.
9
10async function fetchGitHubEvents(username: string) {
11 const response = await fetch(`https://api.github.com/users/${username}/events/public`, {
12 headers: {
13 "User-Agent": "Val-Town-Script",
15 });
16 if (!response.ok) {
17 throw new Error(`GitHub API request failed: ${response.status}`);
18 }
19 return await response.json();

starterThememain.tsx1 match

@iamseeleyUpdated 9 months ago
1export const starterTheme = {
2 fontLink: `<link href="https://fonts.googleapis.com/css2?family=Inter:wght@100..900&display=swap" rel="stylesheet">`,
3 styles: `
4 /* General styles */

MiauFoodmain.tsx4 matches

@mauriciobcUpdated 9 months ago
66 <title>Lista de alimentação</title>
67 <link href="https://unpkg.com/material-components-web@latest/dist/material-components-web.min.css" rel="stylesheet">
68 <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
69 <link href="https://fonts.googleapis.com/css2?family=Outfit:wght@100..900&display=swap" rel="stylesheet">
70 <script src="https://unpkg.com/material-components-web@latest/dist/material-components-web.min.js"></script>
71 <style>
160 <title>Já Comeu?</title>
161 <link href="https://unpkg.com/material-components-web@latest/dist/material-components-web.min.css" rel="stylesheet">
162 <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
163 <link href="https://fonts.googleapis.com/css2?family=Outfit:wght@100..900&display=swap" rel="stylesheet">
164 <script src="https://unpkg.com/material-components-web@latest/dist/material-components-web.min.js"></script>
165 <style>

sqlitemain.tsx3 matches

@maxmUpdated 9 months ago
1import { API_URL } from "https://esm.town/v/std/API_URL";
2import { LibsqlError, type TransactionMode } from "npm:@libsql/client";
3import { z } from "npm:zod";
35
36async function execute(statement: InStatement): Promise<ResultSet> {
37 const res = await fetch(`${API_URL}/v1/sqlite/execute`, {
38 method: "POST",
39 headers: {
49
50async function batch(statements: InStatement[], mode?: TransactionMode): Promise<ResultSet[]> {
51 const res = await fetch(`${API_URL}/v1/sqlite/batch`, {
52 method: "POST",
53 headers: {

mortage_rate_drop_emailmain.tsx4 matches

@almUpdated 9 months ago
3// 4.1%
4const maximumMortageRate = 4.1;
5const fredApiKey = Deno.env.get("FRED_API_SECRET_KEY");
6const fredApiUrl =
7 `https://api.stlouisfed.org/fred/series/observations?series_id=MORTGAGE30US&api_key=${fredApiKey}&file_type=json&sort_order=desc&limit=1`;
8
9export default async function main(req: Request) {
10 try {
11 const response = await fetch(fredApiUrl);
12 const data = await response.json();
13

mortage_rate_drop_emailREADME.md1 match

@almUpdated 9 months ago
1Checks Freddie Mac API for current interest rates, and notifies me if it drops to 4.1% or below so I can refinance.

MuxAITranscriptmain.tsx2 matches

@decepulisUpdated 9 months ago
13});
14const assemblyai = new AssemblyAI({
15 apiKey: Deno.env.get("ASSEMBLY_AI_KEY"),
16});
17const openai = new OpenAI({
18 apiKey: Deno.env.get("OPEN_API_KEY"),
19});
20

MuxAITranscriptREADME.md2 matches

@decepulisUpdated 9 months ago
13
14- Mux Access token details (`MUX_TOKEN_ID`, `MUX_TOKEN_SECRET`) This endpoint requires an existing Mux asset that's ready with an audio-only static rendition associated with it. You can run [this val](https://www.val.town/v/mux/createDubbingTestAsset) to create a new one for testing.
15- AssemblyAI API key (`ASSEMBLYAI_API_KEY`). Get it [from their dashboard here](https://www.assemblyai.com/app/account)
16- OpenAI API key (`OPENAI_API_KEY`). Get it [from their dashboard here](https://platform.openai.com/api-keys)
17
18Make a POST request to the Val's endpoint with the following body, replacing the values with your own asset ID and the list of speakers. Speakers are listed in order of appearance.
2import { OpenAIToolSet } from "npm:composio-core";
3
4const COMPOSIO_API_KEY = Deno.env.get("COMPOSIO_API_KEY"); // Getting the API key from the environment
5const toolset = new OpenAIToolSet({ apiKey: COMPOSIO_API_KEY });
6
7// Creating an authentication function for the user
1# Using OpenAI Assistant API, Composio to Star a Github Repo
2This is an example code of using Composio to star a github Repository by creating an AI Agent using OpenAI API
3
4## Goal
9
10## FAQs
11> How to get Composio API key?
12
13Open [app.composio.dev](app.composio.dev) and log in to your account. Then go to [app.composio.dev/settings](app.composio.dev/settings).
14Navigate to the **API Keys** -> **Generate a new API key**.
15
16![image.png](https://imagedelivery.net/iHX6Ovru0O7AjmyT5yZRoA/5b4a330e-48b9-4a36-64f6-453568322700/public)

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