1.2.3 • Published 3 years ago

@polytoria/users v1.2.3

Weekly downloads
-
License
MIT
Repository
-
Last release
3 years ago

User API!

The user API is a really good way to get and handle data from the polytoria API.

getFromUsername()

Static This function returns user information through the Username.

const User = require('@polytoria/users');

User.getFromUsername('NodeJS').then((result)=>{
    console.log(result.Username); // NodeJS
    console.log(result.Rank); // ADMINISTRATOR
    console.log(result.Description) // NodeJS long ass description lol
})

getFriends();

Function to gather an array of friends of the user.

const Polytoria = new User(1);
const PolyFriends = Polytoria.getFriends().then((friends)=>{
    console.log(friends); // [{username: blah blah}, {username: willemstinky}] etc....
})

getUserData();

A function to get all user data.

const Polytoria = new User(1);
const PolyData = Polytoria.getUserData().then((Data)=>{
    console.log(Data.Username); // Polytoria
})
1.2.3

3 years ago

1.2.2

3 years ago

1.2.1

3 years ago

1.2.0

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago