HomeServerConnector. _CameraArchive
new _CameraArchive()
Camera archive.
May not be directly instanced. An instance of the class is created by the method HomeServerConnector._Connection#getCameraArchive.
Example
var ca = conn.getCameraArchive("CA@MyCameraArchive", function(err, data) {});
Methods
destroy()
Enables the object and cancels any existing subscription.
Example
ca.destroy();
getKey() → String
Returns the key of the object.
Example
var object_key = ca.getKey();
- Returns
-
String
getList(callback)
Retrieves a list of the images in the camera archive. The time stamp and image ID are returned for each image.
Example
Retrieval of the image list.
ca.getList(function(err, items) {});
Parameter
Name | Type | Optional | Description |
---|---|---|---|
callback |
function() |
|
getMeta(callback)
Retrieves the metadata.
Example
Retrieval of metadata.
ca.getMeta(function(err, data) {});
Parameter
Name | Type | Optional | Description |
---|---|---|---|
callback |
function() |
|
getPicture(pictureID, callback)
Retrieves an image from the archive based on the IMAGE ID.
Example
Retrieval of an image.
ca.getPicture(123, function(err, pictureId, dataUrl) {});
Parameters
Name | Type | Optional | Description |
---|---|---|---|
pictureID |
Number |
|
Unique ID of the image. The method getList() returns all possible IDs. |
callback |
function() |
|
Abstract types
getListCallback(err, items)
Example
Retrieval of the image list.
ca.getList(function(err, items) {});
Parameters
Name | Type | Optional | Description |
---|---|---|---|
err |
(Object or undefined) |
|
Error object |
items |
Array |
|
List with the images of the camera archive. Each entry contains the following fields: Structure
Explanation
|
getMetaCallback(err, data)
Example
Retrieval of metadata.
ca.getMeta(function(err, data) {});
Parameters
Name | Type | Optional | Description |
---|---|---|---|
err |
(Object or undefined) |
|
Error object |
data |
Object |
|
Meta information Structure
Explanation
|
getPictureCallback(err, pictureID, dataUrl)
Example
Retrieval of an image.
ca.getPicture(123, function(err, pictureId, dataUrl) {});
Parameters
Name | Type | Optional | Description |
---|---|---|---|
err |
(Object or undefined) |
|
Error object |
pictureID |
String |
|
Image ID |
dataUrl |
String |
|
A string in the data URL format. For description and format see: Data-URL Wiki-Page. |