A lightweight client for communicating with the Visual Novel Database
This library is intended to provide a thin interface for the TCP API that VNDB.org offers. For more advanced data transformation options, check out vndbjs.
Refactoring and rebranding soon:tm:
- Send VNDB-compatible command strings and let vndbjs-core handle the rest
- TLS-secure connections and user login
- Configurable ratelimiting
- Automatic connection pooling
Vndbjs will automatically create a pool of up to 10 connections to VNDB, allowing you to maintain long-lived connections so that your commands can be sent at a moments notice while offering concurrency.
Node v8.9.4 or newer
npm install --save vndbjs-core
const Vndb = require('vndbjs');
const clientName = 'DemoApp'; // used to identify your app to VNDB.org
const config = {
rateLimit: 20, // allows {rateLimit} writes within {rateInterval} milliseconds
rateInterval: 60000,
password: '********', // optional, required to perform `set` commands.
poolMin: 2, // this many connections will be maintained at all times
poolTimeout: 30000, // excess idle connections will be destroyed after this many milliseconds
username: 'yourusername555' // optional, required to perform `set` commands.
}
const vndb = new Vndb(clientName, config);
vndb.send('get vn basic,details (id = 17)')
.then((response) => {
// data
})
Official VNDB.org Documentation
Vndbjs - Enhanced data processing and transformation
Vndbjs is licensed under the MIT license. This library is not associated with VNDB.org