enlonejs
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

enlonejs

Javascript wrapper for enl.one APIs

Install with:

npm install --save enlonejs

Example:

import { V } from 'enlonejs';

const v = new V({ apikey: 'YOUR API KEY GOES HERE' });
// or
// const v = new V({oAuthToken: 'YOUR OAUTH GOES HERE'});
// You have to manage the OAuth flow yourself
(async () => {
    const quantic = (await v.search({ query: 'QuanticPotato' }))[0];
    const potusito = (await v.search({ query: 'Potusito' }))[0];

    console.log(await v.whoami());
    console.log(await v.trust((await v.whoami()).enlid));
    console.log((await v.search({ query: 'QuanticPotato' }))[0]);
    console.log(await v.distance(quantic.enlid, potusito.enlid));
    console.log(await v.bulkInfo([quantic.enlid, potusito.enlid]));
    console.log(await v.bulkInfoArray([quantic.enlid, potusito.enlid]));
    console.log(await v.listTeams());
    console.log(await v.teamDetails((await v.listTeams())[0].teamid));
    console.log(await v.location(quantic.enlid))
})();

Right now only V is implemented. Future plans are to add STRIKE and Status.

Package Sidebar

Install

npm i enlonejs

Weekly Downloads

2

Version

1.0.2

License

ISC

Unpacked Size

30.8 kB

Total Files

12

Last publish

Collaborators

  • qpotato