l2-api

1.0.3 • Public • Published

L2 Api

NPM version Downloads

Intro

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.

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 = 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);

Available functions

Account

  • l2.getAccountByName('account_name')

Chars

  • l2.getCharByName('char_name')
  • l2.getTopPVP(limit)
  • l2.getTopPK(limit)

Package Sidebar

Install

npm i l2-api

Weekly Downloads

2

Version

1.0.3

License

ISC

Unpacked Size

2.99 kB

Total Files

3

Last publish

Collaborators

  • fedeorlandau