cleverapi

1.0.0 • Public • Published

- CleverApi-

Installation

Install from NPM:

npm install cleverapi

Initialise:

const cleverapi = require('cleverapi');

const bot = new cleverapi('<user>', '<key>', '<optional_token>');

Ask a question:

bot.ask('test', '<otpional_token>').then(response => {
	console.log(response); // Will probably respond "Yes this is a test."
}).catch(console.log);

Remembering a session:

Tokens are used to remember sessions, you can either pass this when initialising if you plan to only use one instance or pass it as a second argument when asking a question for multiple sessions.

bot.token; // Gets the token set manually or automatically

Readme

Keywords

none

Package Sidebar

Install

npm i cleverapi

Weekly Downloads

3

Version

1.0.0

License

ISC

Unpacked Size

2.35 kB

Total Files

4

Last publish

Collaborators

  • southkorea