1.0.3 • Published 5 years ago

l2-api v1.0.3

Weekly downloads
1
License
ISC
Repository
github
Last release
5 years ago

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)