4import getUrl from "./sdk";
5
6export default async function(req: Request): Promise<Response> {
7 const url = await getUrl();
8 return html(renderToString(
6});
7
8export default async function getUrl() {
9 const url = await pinata.gateways.convert("QmVLwvmGehsrNEvhcCnnsw5RQNseohgEkFNN1848zNzdng");
10 return url;
19 setLoading(true);
20 if (!onLogin) {
21 setError("Login function is missing.");
22 setLoading(false);
23 return;
1import starFeed from "./starFeed";
2export default async function(req: Request): Promise<Response> {
3 const feed = await starFeed();
4 return new Response(feed, {
1import { rawFetch } from "https://esm.town/v/std/rawFetch";
2
3export async function getStars() {
4 return await feedbinFetch("https://api.feedbin.com/v2/starred_entries.json", {});
5}
6
7export function getEntry(entryId: number) {
8 return feedbinFetch(`https://api.feedbin.com/v2/entries/${entryId}.json`, {});
9}
10
11async function feedbinFetch(url: string, opts: any) {
12 try {
13 const username = Deno.env.get("FEEDBIN_USER");
42const url = Deno.env.get("PUSH_URL") as string;
43
44async function pushValsToGitHub() {
45 const body = "hello";
46 const signature = await sign(body, secret);
3import React from "https://esm.sh/react@18.2.0";
4
5function ImageGenerator() {
6 const [prompt, setPrompt] = React.useState("");
7 const [images, setImages] = React.useState<any>([]);
3import { Eval } from "npm:braintrust";
4
5export default async function handler() {
6 const result = {
7 apiKeyStatus: null,
4import { blob } from "https://esm.town/v/std/blob";
5
6export async function updateNews(sources: string[], newsBlob: string = "news", descMaxLength: number = 400) {
7 // Update news stored in a blob
8
26}
27
28async function fetchSource(url: string, oldItems: any, descMaxLength: number) {
29 // Fetch a source, filter unseen news items
30 console.log(`fetch: ${url}`);
31
32 function parseDescription(description: string, maxlength: number) {
33 // Format a news item description
34
1export default async function (req: Request): Promise<Response> {
2 return Response.json({ ok: true })
3}