1import { fetch } from "https://esm.town/v/std/fetch";
2import { resyPublicAPIKey } from "https://esm.town/v/vtdocs/resyPublicAPIKey";
3
4export const resyVenueIdFromSlugAndCity = async (
10}> => {
11 const venueRes = await fetch(
12 `https://api.resy.com/3/venue?url_slug=${slug}&location=${city}`,
13 {
14 "headers": {
15 "authorization":
16 `ResyAPI api_key="${resyPublicAPIKey}"`,
17 "x-resy-auth-token": resyToken,
18 "x-resy-universal-auth": resyToken,
1export function myApi(name) {
2 return "hi " + name;
3}
3export async function weatherTest(lat, long) {
4 return "hi";
5 const URL = `https://api.weather.gov/points/${lat},${long}`;
6 return URL;
7 const res = await fetch(URL);
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3export let callPrivateAPI = async ({ handle, val, method = "GET", secret }) => {
4 let endpoint;
5 if (handle && val) {
9 endpoint = "galligan.simpleTest";
10 }
11 const valTownUrl = "https://api.val.town/v1/run/" + endpoint;
12 // Make an authenticated request to Val Town API
13 const response = await fetchJSON(valTownUrl, {
14 method,
5 id: string;
6}): Promise<Response> {
7 return fetch("https://api.val.town/v1/vals/" + id, {
8 headers: {
9 Authorization: `Bearer ${token}`,
1export function myApi(name) {
2 return "hi " + name;
3}
1export function myApi(name) {
2 return "hi " + name;
3}
1export function myApi(name) {
2 return "hi " + name;
3}
8 for (let i = 0; i < count; i++) {
9 let start = Date.now();
10 await fetch("https://api.val.town/eval/(()=%3E1+1)()");
11 evalTimes.push(Date.now() - start);
12 }
23 for (let i = 0; i < count; i++) {
24 let start = Date.now();
25 await fetch("https://api.val.town/eval/@healeycodes.addOnes()");
26 userFuncTimes.push(Date.now() - start);
27 }
9
10 return fetchJSON(
11 "https://gmail.googleapis.com/gmail/v1/users/me/settings/filters",
12 {
13 method: "POST",