new MessageList(jmap, optsopt)
This class represents a JMAP MessageList.
Parameters:
Name | Type | Attributes | Description | |||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
jmap |
Client | The Client instance that created this Mailbox. |
||||||||||||||||||||||||||||||||||||||||||||||
opts |
Object |
<optional> |
The optional properties of this Mailbox. Properties
|
- Source:
- See:
Extends
Methods
(static) fromJSONObject(jmap, object) → {MessageList}
Creates a MessageList from its JSON representation.
Parameters:
Name | Type | Description |
---|---|---|
jmap |
Client | The Client instance passed to the MessageList constructor. |
object |
Object | The JSON representation of the MessageList, as a Javascript object. |
- Source:
Returns:
- Type
- MessageList
getMessages(optionsopt) → {Promise}
Fetches all messages contained in this MessageList.
This will delegate to Client#getMessages, passing this MessageList's messageIds as the ids option.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
options |
Object |
<optional> |
The options object passed to Client#getMessages. Please note that the ids option will be overriden if defined. |
- Source:
- See:
Returns:
A promise that eventually resolves with an array of Message instances.
- Type
- Promise
getThreads(optionsopt) → {Promise}
Fetches all threads contained in this MessageList.
This will delegate to Client#getThreads, passing this MessageList's threadIds as the ids option.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
options |
Object |
<optional> |
The options object passed to Client#getThreads. Please note that the ids option will be overriden if defined. |
- Source:
- See:
Returns:
A promise that eventually resolves with an array of Thread instances.
- Type
- Promise