1import { fetch } from "https://esm.town/v/std/fetch";
2
3export async function githubKeys(username: string): Promise<string> {
4 const res = await fetch(`https://github.com/${username}.keys`);
5 return res.text();
6}
1import { fetchJSON } from "https://esm.town/v/dmuth/fetchJSON";
2
3export let get = () => {
4 retval = fetchJSON("https://httpbin.dmuth.org/get");
5 return retval;
6};
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3// GitHub followers
4export let githubFollowers = fetchJSON(
5 "https://api.github.com/users/stevekrouse/followers"
6);
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3// Github followers
4export let githubFollowers = fetchJSON(
5 "https://api.github.com/users/roskideluge/followers",
6);
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export async function getCNNNewsShort() {
4 const response = await fetch(
5 "https://saurav.tech/NewsAPI/everything/cnn.json"
6 );
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export const forbud = async (req: Request) => {
1256 const app = new Hono();
1257 async function getURL() {
1258 const htmlResponse = await fetch("https://datawrapper.dwcdn.net/4iRku");
1259 const htmlData = await htmlResponse.text();
1260 const url = htmlData.split("0; url=")[1].split('">')[0];
1264 async function getDataset() {
1265 let url = await getURL();
1266 const response = await fetch(url, {
1267 headers: {
1268 "Content-Type": "text/csv",
1313 }
1314 app.get("/", async (c) => c.json(await csvToCounties()));
1315 return app.fetch(req);
1316};
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3// Activity suggestions for when you're bored
4export let boredActivities = fetchJSON(
5 "https://www.boredapi.com/api/activity"
6);
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3// Cities named Brooklyn
4export let cityLookup = fetchJSON(
5 "https://nominatim.openstreetmap.org/search.php?city=brooklyn&format=jsonv2"
6);
1import { fetchText } from "https://esm.town/v/stevekrouse/fetchText?v=5";
2
3export const webscrapeWikipediaIntro = (async () => {
4 const cheerio = await import("npm:cheerio");
5 const html = await fetchText(
6 "https://en.wikipedia.org/wiki/OpenAI",
7 );
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3export const telegramGetMe = async (botToken: string) =>
4 fetchJSON(
5 `https://api.telegram.org/bot${botToken}/getMe`,
6 );