@ncharts/sdk
TypeScript icon, indicating that this package has built-in type declarations

0.1.0-unstableΒ β€’Β PublicΒ β€’Β Published

πŸ»β€β„οΈπŸ“¦ @ncharts/sdk

SDK bindings and typings for charted-server

@ncharts/sdk is a fully-typed SDK for interacting with charted-server. This is used by the web interface to send API calls to the API server.

Note: Since we couldn't have charted-dev or charted as the NPM organization, we went with @ncharts/, which is meant to be Noelware Charts Platform.

Usage

# NPM
$ npm i @ncharts/sdk

# Yarn
$ yarn add @ncharts/sdk

# pnpm
$ pnpm i @ncharts/sdk
import { createClient, AuthenticationStrategy } from '@ncharts/sdk';

const client = createClient({
    baseURL: 'https://charts.noelware.org/api',
    authentication: new AuthenticationStrategy.Basic('username', 'password'),
    defaultOptions: {
        // default http client options
    }
});

const noel = await client.users('noel').get();
// => User

const noelRepos = await noel.repositories.all();
// => Repository[]

const repo = await client.repositories.create({
    name: 'my-repo',
    description: 'Basic description for my repository',
    readme: `# Hello, world!
  This is the README for my repository that is available at https://charts.noelware.org/r/username/my-repo

  We can do *very* **wacky** ***things*** that is available for us to do.
`
});
// => Repository

License

@ncharts/sdk is released under the MIT License with love by Noelware. <3

Readme

Keywords

none

Package Sidebar

Install

npm i @ncharts/sdk

Weekly Downloads

0

Version

0.1.0-unstable

License

MIT

Unpacked Size

90 kB

Total Files

6

Last publish

Collaborators

  • auguwu