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=1342&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 18797 results for "api"(2133ms)

zSTYLES_elatedOrangeMonkeymain.tsx1 match

@arfan•Updated 5 months ago
299 <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
300 <title>Link Manager</title>
301 <link href="https://fonts.googleapis.com/css2?family=Quicksand:wght@300;400;500;600;700&display=swap" rel="stylesheet" />
302 <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet" />
303 <link href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.7.2/font/bootstrap-icons.css" rel="stylesheet" />

SteamPlaytimeHistory_playHistoryToSqlitemain.tsx4 matches

@alvi•Updated 5 months ago
3import { play_history, db } from 'https://esm.town/v/alvi/SteamPlaytimeHistory_playHistorySchema';
4
5const STEAM_WEB_API_KEY = process.env.STEAM_WEB_API_KEY;
6const STEAM_ID = process.env.STEAM_ID;
7const DISCORD_WEBSOCKET_URL = process.env.DISCORD_WEBSOCKET_URL;
9
10export default async function(interval: Interval) {
11 if (!STEAM_WEB_API_KEY || !STEAM_ID || !DISCORD_WEBSOCKET_URL || !DISCORD_NOT_PLAYED_URL) {
12 throw new Error("STEAM_WEB_API_KEY, STEAM_ID or DISCORD_WEBSOCKET_URL not set");
13 }
14
15 const url =
16 `http://api.steampowered.com/IPlayerService/GetRecentlyPlayedGames/v0001/?key=${STEAM_WEB_API_KEY}&steamid=${STEAM_ID}&format=json`;
17 console.log(url)
18 const options = { method: "GET" };

savvyTomatoToadmain.tsx4 matches

@yysofiyan•Updated 5 months ago
45 return (
46 <div>
47 <h1>Authors API</h1>
48 <a href={import.meta.url.replace("esm.town", "val.town")} target="_top">By yysfyn</a>
49 </div>
61
62 // Endpoint for getting all authors
63 if (url.pathname === "/api/authors") {
64 return new Response(JSON.stringify(authors), {
65 headers: {
71
72 // Endpoint for getting a specific author by Sinta ID
73 if (url.pathname.startsWith("/api/author/")) {
74 const sintaID = url.pathname.split("/").pop();
75 const author = authors.find(a => a.sinta_id === sintaID);
98 <html>
99 <head>
100 <title>Authors API</title>
101 <style>${css}</style>
102 </head>

discordWebhookExmain.tsx2 matches

@gigmx•Updated 5 months ago
10
11class PumpMonitor {
12 private uri = "wss://pumpportal.fun/api/data";
13 private running = true;
14 private webhookUrl = "https://discord.com/api/webhooks/E4FKxDZzT8aKgTr7eXDs7RV26g9JpZ7Z65Q7YS69pump";
15
16 private formatLaunch(data: any): string {

dynamicLavenderBeetleREADME.md4 matches

@charmaine•Updated 5 months ago
37```
38
39Refer to [Twitter's search operators](https://developer.twitter.com/en/docs/twitter-api/v1/rules-and-filtering/search-operators) to fine-tune your query.
40
41### 4. Test API call
42Set `isProd = false` in the code if you are testing, to ensure there are enough tweets to display. <br>
43Toggle it back to `true` when you're ready to run this cron job in production.
61
62### NOTE: Usage Limits
63This val uses the SocialData API for Twitter data:
64- **Proxies via Val Town's SocialDataProxy**: Limited to 100 calls/day for [**Val Town Pro users**](https://www.val.town/pricing).
65- **Need more calls?** Sign up for your own [SocialData API token](https://socialdata.tools) and configure the [`socialDataSearch`](https://www.val.town/v/stevekrouse/socialDataSearch) function.

hopefulApricotSparrowREADME.md4 matches

@charmaine•Updated 5 months ago
37```
38
39Refer to [Twitter's search operators](https://developer.twitter.com/en/docs/twitter-api/v1/rules-and-filtering/search-operators) to fine-tune your query.
40
41### 4. Test API call
42Set `isProd = false` in the code if you are testing, to ensure there are enough tweets to display. <br>
43Toggle it back to `true` when you're ready to run this cron job in production.
61
62### NOTE: Usage Limits
63This val uses the SocialData API for Twitter data:
64- **Proxies via Val Town's SocialDataProxy**: Limited to 100 calls/day for [**Val Town Pro users**](https://www.val.town/pricing).
65- **Need more calls?** Sign up for your own [SocialData API token](https://socialdata.tools) and configure the [`socialDataSearch`](https://www.val.town/v/stevekrouse/socialDataSearch) function.

evalCodeREADME.md1 match

@tmcw•Updated 5 months ago
19```
20
21You can use this library with https://www.val.town/v/maxm/transformEvalCode to return the last value without needing to export it. This is how the /eval api endpoint used to work and makes the library preform similarly to a repl.
22
23```ts

wideREADME.md1 match

@tmcw•Updated 5 months ago
8import { Wide } from 'https://esm.town/v/maxm/wide';
9
10// Use your Val Town API Token to create a session
11const wide = new Wide(await ValSession.new(Deno.env.get("valtown")))
12

widemain.tsx7 matches

@tmcw•Updated 5 months ago
1import { ValSession } from "https://esm.town/v/maxm/valSession";
2// import type { TSearchFilter, WideApi } from "https://esm.town/v/maxm/wideApi";
3type WideApi = any;
4type TSearchFilter = any;
5import { extractValInfo } from "https://esm.town/v/pomdtr/extractValInfo";
7
8const { htmlUrl } = extractValInfo(import.meta.url);
9const _client = hc<WideApi>("https://maxm-wideapi.web.val.run/");
10
11export class Wide {
14 constructor(sessionToken: string) {
15 // TODO: can we use a global client?
16 this.#client = hc<WideApi>("https://maxm-wideapi.web.val.run/");
17 this.#sessionToken = sessionToken;
18 }
75
76export default async function(req: Request): Promise<Response> {
77 // Use your Val Town API Token to create a session
78 const wide = new Wide(await ValSession.new(Deno.env.get("valtown")));
79 await wide.write([{
98 <script>hljs.highlightAll();</script>
99 <style>
100 @import url('https://fonts.googleapis.com/css2?family=Kumbh+Sans:wght@900&family=Roboto+Mono:wght@400;700&display=swap');
101
102 * {
196import { Wide } from 'https://esm.town/v/maxm/wide';
197
198// Use your Val Town API Token to create a session
199const wide = new Wide(await ValSession.new(Deno.env.get("valtown")))
200

thankfulTurquoiseParrotREADME.md1 match

@tmcw•Updated 5 months ago
4import { ValSession } from "https://esm.town/v/maxm/valSession";
5
6// Generate a token from your valtown api key.
7const token = await ValSession.newSession(Deno.env.get("valtown"));
8

api_zenithpayments_com

@ianmenethil•Updated 3 hours ago

helloEffectHttpApi1 file match

@mattrossman•Updated 17 hours ago
apiry
snartapi