L2 Api is a module that helps you to intereact with your L2OFF and L2J (in the future) projects.
const L2Api = require('l2-api');
const l2 = new L2Api('mssql_user', 'mssql_password', 'mssql_host');
const topPVP = await l2.getTopPVP(20);
As you can see, we can easily get the top 20 PVP of our project.
$ npm install l2-api
The only thing you should do is requiring the module and initialize the L2Api with your credentials.
const L2Api = require('l2-api');
const l2 = new L2Api('mssql_user', 'mssql_password', 'mssql_host');
Now you should be able to do:
const topPVP = await l2.getTopPVP(20);
l2.getAccountByName('account_name')
l2.getCharByName('char_name')
l2.getTopPVP(limit)
l2.getTopPK(limit)