1import { api } from "https://esm.town/v/pomdtr/api";
2import { parseExample } from "https://esm.town/v/pomdtr/val_town_by_example_parse";
3import { blob } from "https://esm.town/v/std/blob";
106 if (typeof ref == "string") {
107 const [author, name] = ref.split("/");
108 const val = await api(`/v1/alias/${author}/${name}`);
109 const example = await parseExample(author, name);
110 group.items.push({
1import { api } from "https://esm.town/v/pomdtr/api";
2import { parseExample } from "https://esm.town/v/pomdtr/val_town_by_example_parse";
3import { blob } from "https://esm.town/v/std/blob";
106 if (typeof ref == "string") {
107 const [author, name] = ref.split("/");
108 const val = await api(`/v1/alias/${author}/${name}`);
109 const example = await parseExample(author, name);
110 group.items.push({
8
91. Click `Fork`
102. Change `location` (Line 4) to describe your location. It accepts fairly flexible English descriptions which it turns into locations via [nominatim's geocoder API](https://www.val.town/v/stevekrouse/nominatimSearch).
113. Click `Run`
12
2
3async function fetchPluginData(pluginId) {
4 const response = await fetch(`https://www.figma.com/api/plugins/${pluginId}/versions`);
5 if (!response.ok) {
6 throw new Error(`Failed to fetch data for plugin ${pluginId}: ${response.statusText}`);
1import { email } from "https://esm.town/v/std/email";
2
3// Hypothetical API functions (these would need to be implemented or replaced with actual APIs)
4import { searchGoogle, searchLinkedIn, searchX } from "https://esm.town/v/mwsz/searchApis";
5
6export const findMentions = async () => {
13Change the `query` variable for what you want to get notified for.
14
15You can use [Twitter's search operators](https://developer.twitter.com/en/docs/twitter-api/v1/rules-and-filtering/search-operators) to customize your query, for some collection of keywords, filtering out others, and much more!
16
17## 3. Notification
3
4
5To authenticate, use an [API Token](https://www.val.town/settings/api).
1import { inferRequestVal } from "https://esm.town/v/andreterron/inferRequestVal";
2import { api } from "https://esm.town/v/pomdtr/api";
3
4export function devtools(handler: (req: Request) => Response | Promise<Response>, options?: {
23
24 if (pathname === "/_logs") {
25 const { id } = await api(`/v1/alias/${val.handle}/${val.name}`);
26 return Response.redirect(`https://www.val.town/settings/evaluations?val=${id}`);
27 }
10 console.log("comment", comment);
11 const fullUrl =
12 `https://${baseUrl}/api/comments/commentManager?secret=${DELETE_COMMENT_SECRET}&commentId=${comment.id}`;
13 const modifiedBody = comment.body.replaceAll("\n", "<br>");
14 await email({
10 console.log("comment", comment);
11 const manageUrl =
12 `https://${baseUrl}/api/comments/commentManager?secret=${DELETE_COMMENT_SECRET}&commentId=${comment.id}`;
13 const modifiedBody = comment.body.replaceAll("\n", "<br>");
14 await email({