Typescript written King of Time(KOT) SDK
BSD-3-CLAUSE License
Unofficial Node.js API client for King of Time Web API.
You can find the official web api spec here.
These are the list of supported features.
Please help me!
You can install this SDK by npm
:
$ npm install kot-sdk
or by yarn
:
$ yarn add kot-sdk
import Kot from 'kot-sdk'
const client = new Kot({token: 'YOUR_ACCESS_TOKEN'})
(async () => {
const employee = await client.employee.get({employeeCode: 100})
})()
The list of the options are described below:
Option | Description | Type | Default |
---|---|---|---|
baseURL |
Base URL of the King of Time Web API | https://api.kingtime.jp/v1.0 |
|
timeout |
Timeout in milliseconds. |
1000 (1 second) |
|
userAgent |
User Agent HTTP header value | KOT SDK/<RELEASE_VERSION> |
Note that this can be configured in multiple ways.
Pass as args as below:
const client = new Kot({
baseUrl: "https://my-proxy.com"
})
Configure each configuration by the Kot
classes' method setXXX
:
const client = new Kot().setTimeout(10000)
kot-sdk
is released under the BSD 3-Clause License. See details LICENSE.