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