14async function reverseGeocodeNominat(lat, lng) {
15 const url = `https://nominatim.openstreetmap.org/reverse?format=json&lat=${lat}&lon=${lng}&zoom=13`;
16 const response = await fetch(url);
17 const json = await response.json();
18 return json;
1import { email } from "https://esm.town/v/std/email";
2import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
3
4export async function dailyDadJoke() {
5 let { setup, punchline } = await fetchJSON("https://official-joke-api.appspot.com/random_joke");
6 console.log(setup, punchline);
7 return email({
14// Generic loader that forwards on requests for that page's JSON data
15function loader({ request }) {
16 return fetch(request, {
17 headers: {
18 "Content-Type": "application/json",
24function action({ request }) {
25 if (request.method === "GET") { throw Error("GET not expected here - something is wrong."); }
26 return fetch(request);
27}
28
5
6export const resumeConfig = {
7 // URL to fetch the resume JSON data. This should point to your raw resume JSON.
8 // If you want to host your resume JSON somewhere I recommend a setup like this on val town (https://www.val.town/v/iamseeley/resumeDetails) or a github gist.
9 // You can test out the resume view using my resume: https://iamseeley-resumedetails.web.val.run
1#!/usr/bin/env -S deno serve --allow-all --env --watch
2
3import { fetchAPI } from "https://esm.town/v/pomdtr/fetchAPI?v=4";
4import { Hono } from "npm:hono";
5
8
9app.get("/", async (c) => {
10 const resp = await fetchAPI("/v1/me", {
11 token,
12 });
51app.get("/vals/list", async (c) => {
52 const userID = c.req.query("user");
53 const resp = await fetchAPI(`/v1/users/${userID}/vals`, {
54 token,
55 paginate: true,
103app.get("/vals/view", async (c) => {
104 const valID = c.req.query("val");
105 const resp = await fetchAPI(`/v1/vals/${valID}`, {
106 token,
107 });
128 const { name, code, privacy, type, val } = await c.req.json();
129
130 await fetchAPI(`/v1/vals/${val}`, {
131 method: "PATCH",
132 token,
200 const { name, code, privacy, type } = await c.req.json();
201
202 const resp = await fetchAPI("/v1/vals", {
203 method: "POST",
204 token,
271app.post("/vals/delete", async (c) => {
272 const { reload, val } = await c.req.json();
273 const resp = await fetchAPI(`/v1/vals/${val}`, {
274 method: "DELETE",
275 token,
294});
295
296export default app.fetch;