New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

valtown-api-types

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

valtown-api-types

This package provides the [Val Town OpenAPI spec](https://www.val.town/docs/openapi.yaml) as a Typescript file.

latest
Source
npmnpm
Version
0.1.1
Version published
Maintainers
1
Created
Source

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);

FAQs

Package last updated on 29 Jul 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts