1export function myApi(name) {
2 return "hi " + name;
3}
2import { runVal } from "https://esm.town/v/std/runVal";
3
4// https://api.val.town/v1/express/zzz.rime?text=Hello%20Val%20Town
5// videoId: either videoId or full youtube url (e.g. https://www.youtube.com/watch?v=p2glje8z_tw)
6export async function YoutubeSummary(req, res) {
2
3export const fetchHTML = (async () => {
4 let f = await fetch("https://api.val.town/express/@beneskildsen.serveHTML", {
5 method: "GET",
6 headers: {
3export let checkResy = (async () => {
4 const axios = await import("npm:axios");
5 const apiUrl = "https://staging-api.resy.com/3/auth/password";
6 const api_key = "VbWk7s3L4KiK5fzlO7JD3Q5EYolJI7n5";
7 const email = process.env.resyEmail;
8 const password = process.env.resyPassword;
9 const config = {
10 headers: {
11 Authorization: `ResyAPI api_key="${api_key}"`,
12 "Content-Type": "multipart/form-data",
13 },
17 formData.append("password", password);
18 axios
19 .post(apiUrl, formData, config)
20 .then((response) => {
21 console.log(response.data);
5 res: express.Response,
6) {
7 let response = await fetch("https://www.dnd5eapi.co/api/spells");
8 let data = await response.json();
9 let countOfSpells = data["count"];
11 let randomSpell = data["results"][randomSpellNumber];
12 let response2 = await fetch(
13 `https://www.dnd5eapi.co/api/spells/${randomSpell["index"]}`,
14 );
15 let data2 = await response2.json();
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}
4 try {
5 const wiki = await fetch(
6 `https://en.wikipedia.org/w/api.php?action=query&format=json&titles=${article}&prop=extracts&explaintext`,
7 ).then((res) => res.json());
8 if (!wiki.query) {
1import { twitterAPIDown } from "https://esm.town/v/stevekrouse/twitterAPIDown";
2
3export async function twitterAPIDownAlert() {
4 if (twitterAPIDown.down)
5 console.email(
6 twitterAPIDown.reason,
7 "Twitter API may be down!"
8 );
9}