0.1.6 • Published 2 years ago

node-nakiri v0.1.6

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

node-nakiri

npm version

Node.js API client for Nakiri.

Getting Started

Before you jump straight into the code, you will need to get an API key for the Nakiri group you want to use the library with. To do this, head over to Nakiri (or whatever instance you want to use) and copy the API key of the group.

You may also want to take note of the group's ID to pass it as a parameter to the client's options.

1. Install the package

npm i node-nakiri
# or
yarn add node-nakiri

2. Import the client

import { Client } from 'node-nakiri';
// or
const { Client } = require('node-nakiri');

3. Set up your event listeners and log in

const client = new Client();

client.on('ready', () => {
  console.log('Boom, baby!');
});

client.on('error', (err) => {
  mylogger.error('Oh no!', err);
});

client.on('entryAdded', (data) => {
  console.log('New entry!', data.value);
});

client.on('entryRemoved', (data) => {
  console.log('RIP entry...', data.value);
});

await client.login('YOUR_NAKIRI_API_KEY');

A more detailed API documentation can be found in the library docs.

License

MIT.

0.1.6

2 years ago

0.1.5

2 years ago

0.1.4

2 years ago

0.1.3

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago