2.0.0 • Published 4 months ago

codewars-node-api v2.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
4 months ago

codewars-node-api

Utility to call the codewars' public api from nodejs.

Not affiliated with codewars.

Installation

Using npm:

npm i codewars-node-api

Note: add --save if you are using npm < 5.0.0

Example Usage

node.js

const { CodewarsV1Api } = require('codewars-node-api');

const cwApi = new CodewarsV1Api();

const userId = 'bradtaniguchi';
cwApi.getUser(userId).then((user) => {
  console.log(user.name); // Brad
});

TypeScript/esm

import { CodewarsV1Api } from 'codewars-node-api';

const cwApi = new CodewarsV1Api();

const userId = 'bradtaniguchi';
cwApi.getUser(userId).then((user) => {
  console.log(user.name); // Brad
});

Documentation

All code documentation is available here: https://bradtaniguchi.dev/codewars-node-api/

CLI

This package comes with a CLI interface that can be used to interact with the API directly from your terminal. This could be useful as a quick reference, or working with other command-line tools.

Usage

codewars-node-cli help

Getting user example

codewars-node-cli user get bradtaniguchi

Getting authored challenges by user example

codewars-node-cli challenges authored bradtaniguchi

Getting completed challenges by user example

codewars-node-cli challenges completed bradtaniguchi

Contributing

See CONTRIBUTING and review the CODE_OF_CONDUCT.

License

See LICENSE

2.0.0

4 months ago

1.1.0

2 years ago

1.0.3

2 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago

0.0.10

3 years ago

0.0.3

3 years ago

0.0.9

3 years ago

0.0.8

3 years ago

0.0.4

3 years ago

0.0.7

3 years ago

0.0.6

3 years ago

0.0.1

4 years ago

0.0.0

4 years ago