Constructor
# new Accounts(token)
The part of the API that interacts with the accounts.
Parameters:
Name | Type | Description |
---|---|---|
token |
string | The authorization token. |
Methods
# async addFriend(profile) → {Promise.<Profile>}
Add a user as your friend.
Parameters:
Name | Type | Description |
---|---|---|
profile |
ProfileResolvable |
Promise.<Profile>
# async fetchCurrentUser() → {Promise.<Profile>}
Fetches the profile of the current user.
Promise.<Profile>
# async fetchFriends() → {Promise.<Array.<Profile>>}
Fetches friend profiles.
Promise.<Array.<Profile>>
# async removeFriend(profile) → {Promise}
Removes a user from your friend list.
Parameters:
Name | Type | Description |
---|---|---|
profile |
number | ProfileResolvable |
Promise
# async updatePassport(passport) → {Promise.<Passport>}
Updates your passport.
Parameters:
Name | Type | Description |
---|---|---|
passport |
PassportResolvable |
Promise.<Passport>