api wrapper from api.xfarr.com
npm install xfarr-apibash
$ npm install xfarr-api
`
yarn:
`bash
$ yarn add xfarr-api
`
Simple to Use
CommonJs (CJS) syntax
`js
const APIWrapper = require('xfarr-api');
`
ECMAScript Modules (ESM) syntax
`ts
import APIWrapper from 'xfarr-api';
`
Example
`js
const xfar = new APIWrapper('ApiKEY');
// How to call the API
xfar.[feature].name
.then(response => {
console.log(response);
})
.catch(error => {
console.error(error.message);
});
// Example of an API call
xfar.stalking.npmjs("xfarr-api")
.then(response => {
console.log(response);
})
.catch(error => {
console.error(error.message);
});
``
| 