9[](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
1import { api } from "https://esm.town/v/pomdtr/api";
2
3type Module = {
19 // search appears in the readme. We'll filter all these out later.
20 const searchString = ` from "https://esm.town/v/${initialSlug}`;
21 const { data } = await api(`/v1/search/vals?query=${encodeURI(searchString)}&offset=0&limit=100`);
22
23 return data
24### TODO
25Some ideas for how to expand this site:
26* **show the upstream dependencies** - no public API for this yet, but could probably make it work with the search api
27* **search for vals** - let people search for vals right from here, using the search api and debouncing
28* **toggle graph complexity** - let people choose to see all dependencies or only valtown dependencies (thru the browser)
29* **cache graphs in DB** - we should be kind to valtown's API by caching graph data as exploring the
30graph involves a lot of calls. maybe only update it when the val version number changes?
31* **handle more module sources** - currently we only group npm, esm.sh, and valtown modules. we could add more or make
9[](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
2
3const browser = await puppeteer.connect({
4 browserWSEndpoint: `wss://connect.browserbase.com?apiKey=${Deno.env.get("BROWSERBASE_API_KEY")}`,
5});
6
1// This val fetches recent tweets about @SnapAR or Lens Studio
2// Updated to use Social Data instead of Twitter API
3
4import { socialDataSearch } from "https://esm.town/v/stevekrouse/socialDataSearch";
1// This val fetches recent tweets about @SnapAR or Lens Studio, removes duplicates,
2// and displays them as embedded tweets with preview images on a dark background.
3// Updated to use Social Data instead of Twitter API
4
5import { socialDataSearch } from "https://esm.town/v/stevekrouse/socialDataSearch?v=5";
40 <title>Build Agency - NEAR Ecosystem</title>
41 <meta name="viewport" content="width=device-width, initial-scale=1">
42 <link href="https://fonts.googleapis.com/css2?family=Poppins:wght@400;700&display=swap" rel="stylesheet">
43 <style>${css}</style>
44 </head>
10 percentageChange: number;
11}
12const FRED_API_KEY = process.env.FRED_API_KEY;
13
14// Function to fetch rate data from FRED API
15async function getRateData(seriesId: string): Promise<RateData> {
16 const url =
17 `https://api.stlouisfed.org/fred/series/observations?series_id=${seriesId}&api_key=${FRED_API_KEY}&file_type=json&sort_order=desc&limit=2`;
18
19 const response = await fetch(url);
12 const updateHtml = async () => {
13 try {
14 const response = await fetch("/api/modify", {
15 method: "POST",
16 headers: { "Content-Type": "application/json" },
99
100async function server(request: Request): Promise<Response> {
101 if (request.method === "POST" && new URL(request.url).pathname === "/api/modify") {
102 const { html, silliness, slang } = await request.json();
103 const client = new Cerebras();