HomeServerConnector. _MessageArchive
Abstract types
new _MessageArchive()
Message archive.
May not be directly instanced. An instance of the class is created by the method HomeServerConnector._Connection#getMessageArchive.
Example
var ma = conn.getMessageArchive("MA@MyMessageArchive", function(err, data) {});
Methods
destroy()
Enables the object and cancels any existing subscription.
Example
ma.destroy();
getData(_count, callback)
Retrieves a specific number of entries of a message archive. The latest entries are always returned.
Example
Retrieval of the (max). 10 last entries.
ma.getData(10, function(err, items) {});
Parameters
Name | Type | Optional | Description |
---|---|---|---|
_count |
Number |
|
Max. number of entries to be returned. |
callback |
function() |
|
getKey() → String
Returns the key of the object.
Example
var object_key = ma.getKey();
- Returns
-
String
getMeta(callback)
Retrieves the metadata.
Example
Retrieval of metadata.
ma.getMeta(function(err, data) {});
Parameter
Name | Type | Optional | Description |
---|---|---|---|
callback |
function() |
|
Abstract types
getDataCallback(err, items)
Example
Retrieval of the (max). 10 last entries.
ma.getData(10, function(err, items) {});
Parameters
Name | Type | Optional | Description |
---|---|---|---|
err |
(Object or undefined) |
|
Error object |
items |
Array |
|
List with the data of the message archive. Each entry contains the following fields: Structure
Explanation
|
getMetaCallback(err, data)
Example
Retrieval of metadata.
ma.getMeta(function(err, data) {});
Parameters
Name | Type | Optional | Description |
---|---|---|---|
err |
(Object or undefined) |
|
Error object |
data |
Object |
|
Meta information Structure
Explanation
|