1export function myApi(name) {
2 const lastUsedName = name;
3 return "hi " + name;
25}): Promise<Reference[]> {
26 const data = await fetchJSON<Reference[]>(
27 "https://api.val.town/v1/me/references?" +
28 searchParams({
29 since: since?.toISOString(),
1export function myApi(name) {
2 return "hi " + name;
3}
5 res: express.Response,
6) => {
7 const data = await fetch("https://dog.ceo/api/breeds/image/random", {
8 method: "get",
9 redirect: "follow",
1export function myApi(name) {
2 return "hi " + name;
3}
7export async function searchManifoldMarkets(query: string) {
8 const result = await fetch(
9 `https://manifold.markets/api/v0/search-markets?${query}`,
10 );
11 const markets = await result.json() as Market[];
1export function myApi(name) {
2 return "hi " + name;
3}
1export function myApi(name) {
2 return "hi " + name;
3}
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3export function tidbytDeviceInfo({ deviceId, apiKey }: {
4 deviceId: string;
5 apiKey: string;
6}) {
7 return fetchJSON(
8 `https://api.tidbyt.com/v0/devices/${deviceId}`,
9 {
10 headers: {
11 Authorization: `Bearer ${apiKey}`,
12 },
13 },
3// Predict the nationality of a name
4export let nameNationality = fetchJSON(
5 "https://api.nationalize.io/?name=michael"
6);