ctan-openapi-fetch
v0.1.0
Published
A thin wrapper around `openapi-fetch` for use with the CTAN API
Readme
ctan-openapi-fetch
A thin wrapper around openapi-fetch for use with the CTAN API
This package re-exports openapi-fetch's factory functions with some defaults for use with the CTAN API, along with types pre-generated by openapi-typescript, allowing for easy use of type-safe CTAN clients.
Installation
$ npm install ctan-openapi-fetchUsage
import { createClient } from 'ctan-openapi-fetch/json-2.0';
const ctan = createClient();
const { data } = await ctan.GET('/pkg/{key}', {
params: {
path: {
key: 'texlive',
},
},
});
console.dir(data);
// {
// id: 'texlive',
// name: 'texlive',
// aliases: [],
// caption: 'A comprehensive distribution of TeX and friends',
// ...For detailed usage of the factory functions and clients, please refer to the openapi-fetch documentation.
