1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
2
3export function nominatimSearch(params: Search): Promise<Place[]> {
4 return fetchJSON(
5 "https://nominatim.openstreetmap.org/search?" +
6 new URLSearchParams({
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
2
3export async function valOutput(req: Request) {
10 const author = match[1];
11 const name = match[2];
12 const val = await fetchJSON(
13 `https://api.val.town/v1/alias/${author}/${name}`,
14 );
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
2import { round } from "https://esm.town/v/stevekrouse/round";
3import { nominatimSearch } from "https://esm.town/v/stevekrouse/nominatimSearch";
16 console.log({ lat, lon, display_name });
17 let url = `https://opensky-network.org/api/states/all?${query}`;
18 let data = await fetchJSON(url);
19 return data?.states?.map((f) => ({
20 icao24: f[0],
1import { msDay } from "https://esm.town/v/stevekrouse/msDay";
2import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
3
4// deprecated in favor of @stevekrouse.openAQLocation
5export let aqiLocation = async ({ lat, lon }: { lat: number; lon: number }) => {
6 const { results } = fetchJSON(
7 "https://api.openaq.org/v2/locations?" +
8 new URLSearchParams({
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export const keepCloudClassifierWarmV4 = async () => {
4 const imgDataUrl =
5 "data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==";
6 const response = await fetch(
7 "https://kaicathy-cloudid.hf.space/run/predict",
8 {
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 );