1import { fetch } from "https://esm.town/v/std/fetch";
2
3export let catFactGetter = () => {
13};
14
15fetch('https://catfact.ninja/fact?max_length=140', requestOptions)
16 .then(response => response.json())
17 .then(result => {
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export const getRaycastDownloadCount = (async () => {
6 );
7 const url = "https://www.raycast.com/tailscale/tailscale";
8 const response = await fetch(url);
9 const html = await response.text();
10 const document = new DOMParser().parseFromString(html, "text/html");
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3// GitHub starred repos
4export let githubStarred = fetchJSON(
5 "https://api.github.com/users/stevekrouse/starred?per_page=10",
6);
1import { fetch } from "https://esm.town/v/std/fetch";
2import { emailWebhookMap } from "https://esm.town/v/neverstew/emailWebhookMap";
3
18 resolve(false);
19 }, 3000);
20 fetch(destination).then((x) => {
21 console.log(`Delivered to ${destination}`);
22 }).catch((x) => {
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export const secretEndpointSuccess = fetch(
4 "https://neverstew-secretEndpoint.web.val.run",
5 { headers: { Authorization: "birdsarentreal" } },
1import { searchParams } from "https://esm.town/v/mgruel/searchParams";
2import { fetchJSON } from "https://esm.town/v/mgruel/fetchJSON";
3
4type Reference = {
24 limit?: Date;
25}): Promise<Reference[]> {
26 const data = await fetchJSON<Reference[]>(
27 "https://api.val.town/v1/me/references?" +
28 searchParams({
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export const getRandomDogImg = async (
5 res: express.Response,
6) => {
7 const data = await fetch("https://dog.ceo/api/breeds/image/random", {
8 method: "get",
9 redirect: "follow",
19 catch (e) {
20 throw new Error(
21 `fetchJSON error: ${e.message} in ${req.baseUrl}\n\n"${t}"`,
22 );
23 }
1import { fetch } from "https://esm.town/v/std/fetch";
2
3type Market = {
6};
7export async function searchManifoldMarkets(query: string) {
8 const result = await fetch(
9 `https://manifold.markets/api/v0/search-markets?${query}`,
10 );
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3export function tidbytDeviceInfo({ deviceId, apiKey }: {
5 apiKey: string;
6}) {
7 return fetchJSON(
8 `https://api.tidbyt.com/v0/devices/${deviceId}`,
9 {
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3// Predict the nationality of a name
4export let nameNationality = fetchJSON(
5 "https://api.nationalize.io/?name=michael"
6);