1import { paths } from "https://esm.town/v/pomdtr/openapi_schema";
2import createClient2 from "npm:openapi-fetch";
3
4/**
1import { modifyFetchHandler } from "https://esm.town/v/andreterron/codeOnValTown?v=50";
2import { form } from "https://esm.town/v/stevekrouse/date_me_form";
3import browse from "https://esm.town/v/stevekrouse/dateme_browse";
13app.get("/faq", faq);
14app.get("/rss.xml", c => dateMeRSS(c.req as unknown as Request));
15export default modifyFetchHandler(app.fetch, {
16 style: `@media (max-width: 500px) {
17 .github-fork-ribbon {
65
66const app = new Hono();
67export default app.fetch;
68app.get("/", async (c) => {
69 const url = c.req.query("url");
1import { blob } from "https://esm.town/v/std/blob?v=12";
2import { email } from "https://esm.town/v/std/email?v=9";
3import { fetchText } from "https://esm.town/v/stevekrouse/fetchText";
4
5export let newValTownOpenAPI = async () => {
6 const savedSpec = await blob.getJSON("vtOpenAPI");
7 let currentSpec = await fetchText(
8 "https://www.val.town/docs/openapi.yaml",
9 );
25
26async function telegramRequest(path, body, authorization?: string) {
27 const response = await fetch("https://stevekrouse-telegramValTownAPI.web.val.run/" + path, {
28 method: "POST",
29 body: JSON.stringify(body),
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3export const telegramSendMessage = async (botToken: string, options: TelegramSendMessageOptions) =>
4 fetchJSON(
5 `https://api.telegram.org/bot${botToken}/sendMessage`,
6 {
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3export const telegramSendPhoto = async (botToken: string, options: TelegramSendPhotoOptions) =>
4 fetchJSON(
5 `https://api.telegram.org/bot${botToken}/sendPhoto`,
6 {
35
36async function postJson(url, body?) {
37 return await fetch(url, {
38 method: "POST",
39 headers: { "Content-Type": "application/json" },
298 return c.json("success");
299});
300export default app.fetch;
2import { Hono } from "npm:hono@3";
3
4// TODO: Fetch from key-value
5const profile = {
6 displayName: "Jordan",
169app.get("/", (c) => c.html(myspaceHtml(profile)));
170
171export default app.fetch;