bioid.id
v1.0.1
Published
Official Bio ID library for interacting with the Bio ID API
Downloads
3
Maintainers
Readme
Bio
- NPM package that gets information from bio id official API
- Useful for websites where users can input any bio id and get user info
- Supports the Promise-API, you will be able to use .then, .catch, etc...
Check out or website Bio.
Installation from NPM
npm i bioid.id
Usage
user(id, options)
- Get a userid
: (REQUIRED) User Bio ID or other ID from optionsoptions
: (OPTIONAL) Options object can have (id_type) propertie(s)options.id_type
: (OPTIONAL) id_type option sets search by a specific ID type, can be one of (user, discord), default is "user"
Examples
(Using Await)
const bio = require('bioid.id');
async function getUserData(){
let user = await bio.user('000000000000');
console.log(user);
}
getUserData(); // calling the function
(Using .then function)
const bio = require('bioid.id');
bio.user('000000000000').then(user => {
console.log(user);
})
(Validation)
const bio = require('bioid.id');
bio.user('000000000000').then(user => {
if(user){
console.log(user); // user found
}else{
console.log("User not found");
}
})
Contributing
© Bio, 2021 - 2022 | TARIQ ([email protected])