Constructor
new Account()
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
asBooleanFilterOption |
BooleanFilterOption | Boolean filter option representation. | |
description |
string | A string describing the account (displayName + webfingerURI). | |
homeserver |
string | The account's home server domain. | |
isLocal |
boolean | True if this account is on the same Mastodon server as the Fedialgo user. | |
localServerUrl |
string | The account's URL on the user's home server. | |
isFollowed |
boolean |
<optional> |
True if this account is followed by the Fedialgo user. |
isFollower |
boolean |
<optional> |
True if this account is following the Fedialgo user. |
noteWithAccountInfo |
string | HTML with note, creation date, followers, and toots count. | |
webfingerURI |
string | The webfinger URI for the account. |
- Implements:
- AccountObj
Extends
- mastodon.v1.Account
Methods
displayNameFullHTML(fontSizeopt) → {string}
Returns the display name with emojis
tags and webfinger URI in HTML.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
fontSize |
number |
<optional> |
DEFAULT_FONT_SIZE |
Returns:
- Type
- string
displayNameWithEmojis(fontSizeopt) → {string}
Returns HTML-ish string that is the display name with custom emojis as
tags.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
fontSize |
number |
<optional> |
DEFAULT_FONT_SIZE |
Returns:
- Type
- string
(async) homeInstanceInfo() → {Promise.<InstanceResponse>}
Gets the account's instance info from the API (note some servers don't provide this).
Returns:
- Type
- Promise.<InstanceResponse>
(static) build(account) → {module:api/objects/account~Account}
Alternate constructor because class-transformer doesn't work with constructor arguments.
Parameters:
Name | Type | Description |
---|---|---|
account |
AccountLike | The account data to build from. |
Returns:
The constructed Account instance.
- Type
- module:api/objects/account~Account
(static) buildAccountNames(accounts) → {AccountNames}
Build a dictionary from Accounts' webfingerURIs to the Account object for easy lookup.
Parameters:
Name | Type | Description |
---|---|---|
accounts |
Array.<module:api/objects/account~Account> | Array of Account objects. |
Returns:
Dictionary from webfingerURI to Account.
- Type
- AccountNames
(static) countAccounts(accounts) → {StringNumberDict}
Dictionary from account's webfingerURI to number of times it appears in 'accounts' argument.
Parameters:
Name | Type | Description |
---|---|---|
accounts |
Array.<module:api/objects/account~Account> | Array of Account objects. |
Returns:
Dictionary from webfingerURI to count.
- Type
- StringNumberDict
(static) countAccountsWithObj(accounts) → {AccountCount}
Dictionary from account's webfingerURI to an object with the account and count.
Parameters:
Name | Type | Description |
---|---|---|
accounts |
Array.<module:api/objects/account~Account> | Array of Account objects. |
Returns:
Dictionary from webfingerURI to {account, count}.
- Type
- AccountCount
(static) logSuspendedAccounts(accounts, logPrefixopt)
Logs all suspended accounts in the provided array.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
accounts |
Array.<module:api/objects/account~Account> | Array of Account objects. | ||
logPrefix |
string |
<optional> |
'logSuspendedAccounts()' | Log prefix. |