0.1.1 • Published 10 months ago

valtown-api-types v0.1.1

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

valtown-api-types

This package provides the Val Town OpenAPI spec as a Typescript file.

Usage

This package is intended for use with a fets API client.

import { NormalizeOAS, createClient } from "fets";
import openapi from "valtown-api-types";

const token = "<YOUR TOKEN>";

const client = createClient<NormalizeOAS<typeof api>>({
  endpoint: "https://api.val.town",
});

const resp = await client["/v1/alias/{username}/{val_name}"].get({
  params: { username: "nbbaier", val_name: "hello" },
  headers: { Authorization: `Bearer ${token}` },
});

const val = await resp.json();
console.log(val);
0.1.1

10 months ago

0.1.0

10 months ago

0.0.5

10 months ago

0.0.4

10 months ago

0.0.3

10 months ago

0.0.2

10 months ago

0.0.1

10 months ago