Abigor
Work with Loop users in Node.js
Getting Started
Follow these simple instructions to get set up and ready to use abigor.
Via npm 📦
npm is the package manager for javascript
Read about npm here 💩
(I personally like using yarn 🙉 )
View the npm page for abigor here 📄
Installing
Install abigor just like any other package: 📦
With npm:
npm i -s abigor
With Yarn:
yarn add abigor
And use it:
const abigor = ;
Or, with TypeScript
or commands individually
Usage
Assuming that abigor
is assigned to the abigor variables 🙊
abigor.getDay
Gets the current day 📆
abigor.getDay: Promise<number>
abigor.today
Alias of getDay
abigor.today: Promise<number>
abigor.clauneck
This is clauneck 🍦
abigor.Request
A class for a Request
new abigor.Request
abigor.Request Variables
Variables you might want
declare
abigor.Request.create
This creates the request. Don't do this if the request has already been created.
abigor.Request.create: Promise<Request>
abigor.Request.get
Get the request details
abigor.Request.get: Promise<>
abigor.Request.deny
Deny a request
abigor.Request.deny user: User | string, password?: string: Promise<true>
abigor.Request.accept
Accept a request
abigor.Request.accept user: User | string, password?: string: Promise<true>
abigor.request
Sends a request to Bifrons' abigor.
abigor.request path: string, parameters?: object: Promise<any>
abigor.Wallet
A class for wallets
new abigor.Walletid?: string, password?: string
abigor.Wallet Variables
Variables you might use
declare
abigor.Wallet.open
Opens a new wallet
abigor.Wallet.open: Promise<Wallet>
abigor.Wallet.close
Closes a wallet
abigor.Wallet.close: Promise<void>
abigor.Wallet.get
Get wallet details
abigor.Wallet.get: Promise<>
abigor.Wallet.chips
Get a wallet's chips
abigor.Wallet.chips: Promise<number>
abigor.Wallet.historyWithIDs
Get a wallet's history
abigor.Wallet.historyWithIDs: Promise<>
abigor.Wallet.history
Get a wallet's history
abigor.Wallet.history: Promise<>
abigor.Wallet.add
Adds chips to a wallet
abigor.Wallet.add amount: number, user: string | User, password?: string: Promise<Wallet>
abigor.Wallet.take
Removes chips to a wallet
abigor.Wallet.add amount: number, user: string | User, password?: string: Promise<Wallet>
abigor.getChips
Get chips information.
abigor.getChips handle?: string | User, day?: number: Promise<number | >
abigor.User
A class for users
new abigor.Userhandle?: string, password?: string
abigor.User Variables
Variables you might use
declare
abigor.User.chips
Get a user's chips
abigor.User.chipsday?: number: Promise<number>
abigor.User.id
Get a user's ID
abigor.User.chips: Promise<number>
abigor.User.name
Get a user's name
abigor.User.name: Promise<string>
abigor.User.fullName
Get a user's full name
abigor.User.fullName: Promise<string>
abigor.User.setFullName
Ser a user's full name
abigor.User.setFullName fullName?: string: Promise<any>
abigor.getLoggedInUser
Get the user that is currently logged in
abigor.getLoggedInUser: Promise<undefined | User>
abigor.logged
Alias of abigor.getLoggedInUser
abigor.logged: Promise<undefined | User>
abigor.sessionInfo
Gets the current session's info
abigor.sessionInfo: Promise< | undefined>
abigor.sessionMatch
Checks if a session's information is correct (you can use this to make sure people aren't faking identity!)
abigor.sessionMatch id?: number, sessionID?: string, sessionPsk?: string: Promise<any>
abigor.sessionClose
Closes a session, non-current sessions shouldn't be open!
abigor.sessionClose id?: number, sessionID?: string, sessionPsk?: string: Promise<any>
Wrapping Up
If you catch something or want to work on abigor, it is open-sourced on GitHub!
Thanks for reading!
Questions? Comments? Concerns? email nullaeus@gmail.com or join Loop's Discord server