@sokkuri/api
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

API

ci npm

Wrapper for the Sokkuri API.

Setup & Build

Install all dependencies:

npm install

Build:

npm run build

Usage

Initial configuration:

import { ApiConfig } from "@sokkuri/api";

ApiConfig.init({
    // Required
    baseUrl: "/api/",
    onAuthenticate: () => { return Promise.resolve("access_token"); },

    // Optional
    onError: (statusCode: number) => { ... }
});

Data Contexts

Import the context that you need and use it like this, for example:

import { AnimeDataContext } from "@sokkuri/api";

let context = new AnimeDataContext();
context.getAnime("ID").then(x => console.log(x));

Readme

Keywords

none

Package Sidebar

Install

npm i @sokkuri/api

Weekly Downloads

1

Version

1.0.1

License

MPL-2.0

Unpacked Size

127 kB

Total Files

24

Last publish

Collaborators

  • teranovalp