Readme

Typed Client for the Val Town API

Automatically generated using open-api-typescript and openapi-fetch.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import createClient from "https://esm.town/v/pomdtr/val_town_client";
const client = createClient({
token: Deno.env.get("valtown"),
});
const { data, error } = await client.GET("/v1/search/vals", {
params: {
query: {
query: "fetchJSON",
limit: 30,
offset: 60,
},
},
});
if (error) {
console.log(error);
} else {
console.log(data);
}
👆 This is a val. Vals are TypeScript snippets of code, written in the browser and run on our servers. Create scheduled functions, email yourself, and persist small pieces of data — all from the browser.