kot-sdk
TypeScript icon, indicating that this package has built-in type declarations

0.1.28 • Public • Published

King of Time (KOT) SDK

npm version

Test Publish codecov dependency License

Unofficial Node.js API client for King of Time Web API.

You can find the official web api spec here.

Supported Features

These are the list of supported features.

  • [ ] Token service
  • [ ] Company
  • [ ] Admin
  • [ ] Employee
    • [x] Get
    • [x] List
  • [ ] Working
    • [ ] Daily
      • [ ] Record
        • [x] Post record
      • [ ] Schedule
    • [ ] Monthly
      • [ ] Record
      • [ ] Schedule
    • [ ] Yearly

Please help me!

Install

You can install this SDK by npm:

$ npm install kot-sdk

or by yarn:

$ yarn add kot-sdk

Basic Usage

import Kot from 'kot-sdk'

const client = new Kot({token: 'YOUR_ACCESS_TOKEN'})

(async () => {
    const employee = await client.employee.get({employeeCode: 100})
})()

Options

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.

1. On instance creation

Pass as args as below:

const client = new Kot({
    baseUrl: "https://my-proxy.com"
})

2. With method

Configure each configuration by the Kot classes' method setXXX:

const client = new Kot().setTimeout(10000)

Author

License

kot-sdk is released under the BSD 3-Clause License. See details LICENSE.

Readme

Keywords

Package Sidebar

Install

npm i kot-sdk

Weekly Downloads

6

Version

0.1.28

License

ISC

Unpacked Size

41.7 kB

Total Files

48

Last publish

Collaborators

  • keisukeyamashita