Class

Accounts

Accounts(token)

Constructor

# new Accounts(token)

The part of the API that interacts with the accounts.
Parameters:
Name Type Description
token string The authorization token.

View Source structures/accounts/Accounts.js, line 14

Methods

# async addFriend(profile) → {Promise.<Profile>}

Add a user as your friend.
Parameters:
Name Type Description
profile ProfileResolvable

View Source structures/accounts/Accounts.js, line 73

Promise.<Profile>

# async fetchCurrentUser() → {Promise.<Profile>}

Fetches the profile of the current user.

View Source structures/accounts/Accounts.js, line 143

Promise.<Profile>

# async fetchFriends() → {Promise.<Array.<Profile>>}

Fetches friend profiles.

View Source structures/accounts/Accounts.js, line 43

Promise.<Array.<Profile>>

# async fetchPassport() → {Promise.<Passport>}

Fetches the current passport.

View Source structures/accounts/Accounts.js, line 201

Promise.<Passport>

# async removeFriend(profile) → {Promise}

Removes a user from your friend list.
Parameters:
Name Type Description
profile number | ProfileResolvable

View Source structures/accounts/Accounts.js, line 109

Promise

# async updatePassport(passport) → {Promise.<Passport>}

Updates your passport.
Parameters:
Name Type Description
passport PassportResolvable

View Source structures/accounts/Accounts.js, line 170

Promise.<Passport>