new Account(jmap, id, optsopt)
This class represents a JMAP Account.
Parameters:
Name | Type | Attributes | Description | |||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
jmap |
Client | The Client instance that created this Account. |
||||||||||||||||||||||||||
id |
String | The unique identifier of this Account. |
||||||||||||||||||||||||||
opts |
Object |
<optional> |
The optional properties of this Account. Properties
|
- Source:
- See:
Extends
Methods
(static) fromJSONObject(jmap, object) → {Account}
Creates an Account from its JSON representation.
Parameters:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
jmap |
Client | The Client instance passed to the Account constructor. |
||||||
object |
Object | The JSON representation of the Account, as a Javascript object. Properties
|
- Source:
Returns:
- Type
- Account
getMailboxes(optionsopt) → {Promise}
Fetches all mailboxes of this Account.
This will delegate to Client#getMailboxes, passing this Account's id as the accountId option.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
options |
Object |
<optional> |
The options object passed to Client#getMailboxes. Please note that the accountId option will be overriden if defined. |
- Source:
- See:
Returns:
A promise that eventually resolves with an array of Mailbox instances.
- Type
- Promise
hasCalendars() → {Boolean}
Returns whether this Account
supports calendars or not.
- Source:
Returns:
true if and only if this Account
has calendars enabled, false otherwise.
- Type
- Boolean
hasContacts() → {Boolean}
Returns whether this Account
supports contacts or not.
- Source:
Returns:
true if and only if this Account
has contacts enabled, false otherwise.
- Type
- Boolean
hasMail() → {Boolean}
Returns whether this Account
supports mail or not.
- Source:
Returns:
true if and only if this Account
has mail enabled, false otherwise.
- Type
- Boolean
toJSONObject()
Creates a JSON representation from this Account.
- Source:
Returns:
JSON object with only owned properties and non-null default values.