1export function myApi(name) {
2 return "hi " + name;
3}
1export function myApi(name, welcome) {
2 return "hi " + name + `, ${welcome}`;
3}
3
4export const upscaleThisUrl = async (req, res) => {
5 const authToken = process.env.REPLICATE_API_TOKEN;
6 const url = "https://api.replicate.com/v1/predictions";
7 const jobId = req.body.jobId;
8 const imageUrl = req.body.imageUrl;
8 const username = "stevekrouse";
9 const events = await fetchJSON(
10 `https://api.github.com/users/${username}/events?per_page=100`,
11 {
12 headers: {
6 while (true) {
7 res = await fetchJSON(
8 `https://discord.com/api${route}`,
9 {
10 method,
1export const resyPublicAPIKey = "VbWk7s3L4KiK5fzlO7JD3Q5EYolJI7n5";
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,