LITdevs / node-omglol

OMG.LOL API wrapper for Node.js

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

This is a wrapper for the omg.lol API. It is written in TypeScript and is very easy to use.

Installation

# With yarn
yarn add omg.lol
# With npm
npm install omg.lol

Usage

// With ESM or TypeScript
import OmgClient from "omg.lol";

// With CommonJS
const OmgClient = require("omg.lol").default;

// Create a new client, with your token and email
// Email is required becase adam removed the endpoint that made it not required /lh
const client = new OmgClient(token, email);

// You can then call various API endpoints
// For example, to get an Account instance
const account = await client.getAccount();

// You can then call various methods on the Account instance
// For example, to get the addresses
const addresses = await account.getAddresses();

// Or active sessions
const sessions = await account.getActiveSessions();
// You can then destroy a session
await sessions[0].destroy();

// Full list of methods are still being worked on, but should be found at https://litdevs.github.io/node-omglol/classes/OmgClient-1.html

About

OMG.LOL API wrapper for Node.js

License:Other


Languages

Language:TypeScript 99.4%Language:JavaScript 0.6%