Unofficial CLI for King of Time
Go to file
adam 2ecffe6e65 Add missing npm install command to README 2024-02-29 09:59:02 +00:00
bin remove typescript 2023-04-17 00:52:01 +09:00
src Merge remote-tracking branch 'refs/remotes/origin/main' 2023-10-02 09:59:29 +09:00
test remove typescript 2023-04-17 00:52:01 +09:00
.dockerignore Add Dockerfile 2023-10-02 10:15:40 +09:00
.editorconfig npx oclif generate kingoftime-cli 2023-04-14 22:20:36 +09:00
.eslintignore npx oclif generate kingoftime-cli 2023-04-14 22:20:36 +09:00
.eslintrc npx oclif generate kingoftime-cli 2023-04-14 22:20:36 +09:00
.gitignore npx oclif generate kingoftime-cli 2023-04-14 22:20:36 +09:00
.mocharc.json npx oclif generate kingoftime-cli 2023-04-14 22:20:36 +09:00
Dockerfile Add Dockerfile 2023-10-02 10:15:40 +09:00
LICENSE MIT 2023-04-27 01:02:29 +09:00
README.md Add missing npm install command to README 2024-02-29 09:59:02 +00:00
package.json Merge remote-tracking branch 'refs/remotes/origin/main' 2023-10-02 09:59:29 +09:00
white_rabbit.jpg Add white rabbit image 🐇⏱️ 2023-04-27 00:50:26 +09:00

README.md

King of Time CLI (unofficial)

Usage

$ kot checkin
{ result: 'OK', image_result: '0', comment_result: '0' }

$ kot checkout
{ result: 'OK', image_result: '0', comment_result: '0' }

Installation

From the same directory as this README:

$ npm install
$ npm install -g

Now the kot command should be available on your system.

Set Tokens

You need to provide two tokens, which can be retrieved by inspecting the HTTP request to /bprgateway the King of Time Web UI makes when submitting a check-in or check-out request.

It is convenient to set these as the below environment variables, although they can also be passed as options to the checkin and checkout commands.

  • KINGOFTIME_TOKEN
  • KINGOFTIME_USER_TOKEN

Commands

kot checkin

Check in

USAGE
  $ kot checkin --token <value> --user-token <value>

FLAGS
  --token=<value>       (required) Defaults to the KINGOFTIME_TOKEN environment variable.
  --user-token=<value>  (required) Defaults to the KINGOFTIME_USER_TOKEN environment variable.

DESCRIPTION
  Check in

EXAMPLES
  $ kot checkin

kot checkout

Check out

USAGE
  $ kot checkout --token <value> --user-token <value>

FLAGS
  --token=<value>       (required) Defaults to the KINGOFTIME_TOKEN environment variable.
  --user-token=<value>  (required) Defaults to the KINGOFTIME_USER_TOKEN environment variable.

DESCRIPTION
  Check out

EXAMPLES
  $ kot checkout

kot help [COMMANDS]

Display help for kot.

USAGE
  $ kot help [COMMANDS] [-n]

ARGUMENTS
  COMMANDS  Command to show help for.

FLAGS
  -n, --nested-commands  Include all nested commands in the output.

DESCRIPTION
  Display help for kot.

See code: @oclif/plugin-help

Credits

Inspired by https://github.com/inabajunmr/kotrcli