1export function myApi(name) {
2 return "hi " + name;
3}
30 : {};
31 return fetchJSON(
32 "https://api.val.town/v1/vals/" + id,
33 { headers },
34 );
11 contentType = "application/json";
12 }
13 url.host = "api.val.town";
14 url.pathname = `v1/run/${owner}.${name}`;
15 const body = await req.text();
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 const paginateAPI = async (
4 url: string,
5 options: Parameters<typeof fetch>[1],
5 let key = pushDeerKey;
6 await fetch(
7 `https://api2.pushdeer.com/message/push?pushkey=${key}&text=${msg}`
8 );
9};
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3// Explore the Star Wars universe, from StarWarsAPI
4export let starWars = fetchJSON(
5 "https://swapi.dev/api/people/1/"
6);
1export function myApi(name) {
2 return "hi " + name;
3}
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export const openstreetmapAPIexample = (async () => {
4 return (await fetch("https://api.openstreetmap.org/api/0.6/node/1", {
5 headers: { accept: "application/json" },
6 })).json();