Code Monkey home page Code Monkey logo

js-sdk's Introduction

WARNING

@ncharts/types has been merged into the main repository under the types/js folder. @ncharts/sdk is deprecated and shouldn't be used.

๐Ÿปโ€โ„๏ธ๐Ÿ“ฆ @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, AuthStrategy } from '@ncharts/sdk';

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

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

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

// Create a repository for 'noel/my-repo'
const repo = await noel.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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.