Skip to content

How to install esiJS

Gingka Akiyama edited this page May 22, 2021 · 2 revisions

How to install esiJS :

  1. Install npm
  2. npm i --save esijs
  3. Put this in your code 👍
const esiJS = require('esijs')
const esiClient = new esiJS({})
// Use all functions like this:
esiClient.group.<subgroup>.function()
    .then(r => {
        let headers = r.headers
        let data = r.data

        // do something with headers and data
    })
    .catch(e => { // .then/.catch is used when you don't await a function
        // whatever you want to do with errors
    })
// Or like this:
try {
    let data = await esiClient.group.<subgroup>.function()
} catch(e) { // try/catch is used when you await a function
    // Error? What error?
}

Isn't it easy ? :)

Clone this wiki locally