1import { fetch } from "https://esm.town/v/std/fetch";
2
3export const bookReservationOnResy = async ({
143 params.email
144 )}&password=${encodeURIComponent(params.password)}`;
145 const response = await fetch(`${RESY_API_URL}/3/auth/password`, {
146 method: "POST",
147 body: body,
165 }) => {
166 const url = `${RESY_API_URL}/3/details`;
167 const response = await fetch(url.toString(), {
168 method: "POST",
169 headers: RESY_DEFAULT_HEADERS,
190 searchParams.set("party_size", params.seats.toString());
191 searchParams.set("venue_id", params.venueId);
192 const response = await fetch(`${url}?${searchParams}`, {
193 method: "GET",
194 headers: RESY_DEFAULT_HEADERS,
210 searchParams.set("url_slug", params.slug);
211 searchParams.set("location", params.city);
212 const response = await fetch(`${url}?${searchParams}`, {
213 method: "GET",
214 headers: RESY_DEFAULT_HEADERS,
222 authToken: string;
223 }) => {
224 const response = await fetch(`${RESY_API_URL}/3/book`, {
225 method: "POST",
226 headers: {
247 venueId,
248 });
249 console.log("Fetched available slots for day", {
250 count: slots.length,
251 times: slots.map((slot) => `${slot.date.start} -> ${slot.date.end}`),
1import { fetchJSON } from "https://esm.town/v/hanu/fetchJSON";
2
3export let ip = await fetchJSON("https://api.ipify.org?format=json");
1export let geolocation = async (req, res) => {
2 const ip = req.options.headers["x-forwarded-for"];
3 const jsonresponse = await $stevekrouse.fetchJSON(
4 `http://ip-api.com/json/${ip}`
5 );
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export async function getCNNNews() {
4 const response = await fetch(
5 "https://saurav.tech/NewsAPI/everything/cnn.json"
6 );
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3// Public holidays in the US in 2023
4export let holidaysUS = fetchJSON(
5 "https://date.nager.at/api/v3/PublicHolidays/2023/KR"
6);
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export const fetchJavascriptWeeklyIssues = fetch("https://javascriptweekly.com/issues")
4 .then((res) => {
5 const domText = res.text();
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3interface APIResponse {
10 // "https://gisn.tel-aviv.gov.il/arcgis/rest/services/IView2/MapServer/860/query?where=1=1&outFields=*&f=geojson";
11 const url = "https://app.digital4grids.com/api";
12 const json_data = await fetchJSON(url);
13 return { "json_data": [] };
14}
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3export const githubUser = (async () => {
4 const username = "stevekrouse";
5 const user = await fetchJSON(
6 `https://api.github.com/users/${username}`,
7 );
4 app.get("/", (c) => c.text("Hono yes?"));
5 app.get("/yeah", (c) => c.text("Routing ok!"));
6 return app.fetch(req);
7};
8// Forked from @tmcw.honoExample
1export const CLIBlog = (async () => {
2 // let response = await fetch(
3 // "https://example-files.online-convert.com/document/txt/example.txt",
4 // );