56
57 const val = await fetchJSON(
58 `https://api.val.town/v1/vals`,
59 {
60 method: "POST",
2import { generateValCode } from "https://esm.town/v/yawnxyz/generateValCode";
3
4export let generateValCodeAPI = (description: string) =>
5 generateValCode(
6 process.env.OPENAI_API_KEY,
7 description,
8 );
1Migrated from folder: Archive/generateValCodeAPI
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
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
1This Frankenstein of an example shows how well Hono, htmx, and Alpine play together.
2- Hono serves the frameworks, API calls, and functions
3- htmx handles ajax requests, and can very powerfully request html and other content to swap out the front-end
4- alpine handles app-like reactivity without having to always resort to server round trips
24
25 capturePostHogEvent(
26 Deno.env.get("phProjectAPIKey"),
27 webhookPayload.sender.login,
28 "GitHub Star",
23
24 capturePostHogEvent(
25 Deno.env.get("phProjectAPIKey"),
26 webhookPayload.sender.login,
27 "GitHub Star",
23
24 capturePostHogEvent(
25 Deno.env.get("phProjectAPIKey"),
26 webhookPayload.sender.login,
27 "GitHub Star",
24}
25async function getUploadURL(): Promise<string> {
26 const data = await (await fetch("https://www.val.town/api/trpc/generateImageUploadUrl", {
27 "headers": {
28 "content-type": "application/json",