1import { email } from "https://esm.town/v/std/email?v=9";
2import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
3import { nominatimSearch } from "https://esm.town/v/stevekrouse/nominatimSearch";
4import { weatherGovGrid } from "https://esm.town/v/stevekrouse/weatherGovGrid";
14 lon,
15 });
16 let { properties: { periods } } = await fetchJSON(
17 grid.forecastHourly,
18 );
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=44";
2import { google } from "npm:googleapis";
3
4export async function getAccessToken(accountId: string, bearer = Deno.env.get("pipedream")) {
5 const response = await fetchJSON(
6 `https://api.pipedream.com/v1/accounts/${accountId}?include_credentials=1`,
7 { bearer },
22 });
23
24 fetch(`https://iamseeley-Map.web.val.run?city=${encodeURIComponent(city)}`)
25 .then(response => response.json())
26 .then(mapData => {
4app.get("/", (c) => c.text("Hello from Hono!"));
5app.get("/yeah", (c) => c.text("Routing!"));
6export default app.fetch;
10
11 constructor() {}
12 async fetch(req: Request): Promise<Response> {
13 if (new URL(req.url).pathname === "/robots.txt") {
14 return new Response("User-agent: *\nDisallow: /");
231const sc = new StaticChess();
232
233export default sc.fetch.bind(sc);
10export const registered: Readonly<typeof _registered> = _registered;
11
12export const handler = (req: Request) => app.fetch(req);
13
14export interface Context {
10
11 constructor() {}
12 async fetch(req: Request): Promise<Response> {
13 if (new URL(req.url).pathname === "/robots.txt") {
14 return new Response("User-agent: *\nDisallow: /");
224const sc = new StaticChess();
225
226export default sc.fetch.bind(sc);
114 }
115
116 const html = await fetch(url.toString(), {
117 method: req.method,
118 headers: new Headers({
121 "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8",
122 "Accept-Language": "en-US,en;q=0.5",
123 "Sec-Fetch-Site": "cross-site",
124 "Sec-Fetch-Mode": "navigate",
125 "Sec-Fetch-User": "?1",
126 "Sec-Fetch-Dest": "document",
127 "Referer": "https://www.google.com/",
128 "sec-ch-ua": `"Not A Brand";v="99", "Google Chrome";v="91", "Chromium";v="91"`,
145 transcript += arr.map(({ text }) => text).join("\n\n");
146 } catch (e) {
147 transcript = `Failed to fetch transcript ${e}\n`;
148 }
149 let header = "";
153 + y.description + "\n</div>\n\n";
154 } catch (e) {
155 header = `Failed to fetch youtube metadata: ${e}\n`;
156 }
157 markdown = header + "\n" + transcript;
7async function markdown(url: string) {
8 const encoded = encodeURIComponent(url);
9 const response = await fetch(`https://markdown.download/?url=${encoded}`);
10 return await response.text();
11}
29 if (url.pathname == "/search") {
30 const query = url.searchParams.get("q");
31 const resp = await fetch(`https://api.github.com/search/code?q=${githubQuery(query)}`, {
32 headers: {
33 "Accept": "application/vnd.github.text-match+json",