1import { fetch } from "https://esm.town/v/std/fetch";
2
3export const glifs = async (id: string) => {
4 const url = `https://glif.app/api/glifs?featured=1`;
5 try {
6 const response = await fetch(url);
7 if (!response.ok) {
8 throw new Error(`HTTP error! status: ${response.status}`);
1import { basicAuthorization } from "https://esm.town/v/stevekrouse/basicAuthorization";
2import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
3
4export async function refreshTwitterToken(
15 client_id,
16 });
17 return fetchJSON(url, {
18 method: "POST",
19 headers: {
1import { email } from "https://esm.town/v/std/email?v=9";
2import { fetch } from "https://esm.town/v/std/fetch";
3
4export const shitIsMySiteDown = async () => {
12 let status = "up";
13 try {
14 const response = await fetch(URL);
15 if (response.status !== 200) {
16 throw new Error(`status code: ${response.status}`);
1import { basicAuthorization } from "https://esm.town/v/stevekrouse/basicAuthorization";
2import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
3
4export async function twitterRequestAccessToken(
18 redirect_uri,
19 });
20 return fetchJSON(url, {
21 method: "POST",
22 headers: {
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export const searchArXiV = async ({ query = "", start = 0, max_results = 10 }) => {
7 url.searchParams.set("start", start);
8 url.searchParams.set("max_results", max_results);
9 const response = await fetch(url.toString());
10 const text = await response.text();
11 if (!response.ok) {
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export const simpleClimbing = (async () => {
59 },
60 ];
61 // const rawWeatherData = await fetch(
62 // `https://api.climbingweather.com/area/detail/738?days=1`,
63 // ).then((r) => r.json());
65 areas.map(async (
66 a,
67 ) => (await fetch(
68 `https://api.climbingweather.com/area/detail/${a.id}?days=1`,
69 ).then((r) => r.json()).then((d) => ({
1import { fetch } from "https://esm.town/v/std/fetch";
2
3let getEpicTvProduct = async (url) => {
4 const cheerio = await import("npm:cheerio@1.0.0-rc.12");
5 const html = await (await fetch(url)).text();
6 const $ = cheerio.load(html);
7 console.log("how it run?");
21 return c.json({ newNode });
22 });
23 return app.fetch(req);
24};
1export function runValAPI(name, ...args) {
2 return fetch(`https://api.val.town/v1/run/${name.replace("@", "")}`, {
3 method: "POST",
4 body: JSON.stringify({
23 });
24
25 return app.fetch(req);
26};