HomeServerConnector. _VacationCalendar
new _VacationCalendar()
Holiday calendar.
May not be directly instanced. An instance of the class is created by the method HomeServerConnector._Connection#getVacationCalendar.
Example
var vc = conn.getVacationCalendar("VC@MyCalendar", function(err, data) {});
Methods
destroy()
Enables the object and cancels any existing subscription.
Example
vc.destroy();
get(callback)
Returns the status of the holiday calendar
Example
Retrieval of the status.
vc.get(function(err, active, from, to) {});
Parameter
Name | Type | Optional | Description |
---|---|---|---|
callback |
function() |
|
getKey() → String
Returns the key of the object.
Example
var object_key = vc.getKey();
- Returns
-
String
getMeta(callback)
Retrieves the metadata.
Example
Retrieval of metadata.
vc.getMeta(function(err, data) {});
Parameter
Name | Type | Optional | Description |
---|---|---|---|
callback |
function() |
|
set(active, from, to, callback)
Changes the values of a holiday calendar.
Example
Set holiday calendar.
vc.set(true, new Date(2016, 4, 1), new Date(2016, 4, 31), function(err) {}); // Active from 01.05.2016 to 31.05.2016
Parameters
Name | Type | Optional | Description |
---|---|---|---|
active |
Boolean |
|
true: the holiday calendar is active. |
from |
Date |
|
Start of the period. |
to |
Date |
|
End of the period. |
callback |
function() |
|
Abstract types
getCallback(err, active, from, to)
Example
Retrieval of the status.
vc.get(function(err, active, from, to) {});
Parameters
Name | Type | Optional | Description |
---|---|---|---|
err |
(Object or undefined) |
|
Error object |
active |
Boolean |
|
true: the holiday calendar is active. |
from |
Date |
|
Start of the period. |
to |
Date |
|
End of the period. |
getMetaCallback(err, data)
Example
Retrieval of metadata
vc.getMeta(function(err, data) {});
Parameters
Name | Type | Optional | Description |
---|---|---|---|
err |
(Object or undefined) |
|
Error object |
data |
Object |
|
Meta information Structure
Explanation
|
setCallback(err)
Example
Set holiday calendar.
vc.set(true, new Date(2016, 4, 1), new Date(2016, 4, 31), function(err) {}); // Active from 01.05.2016 to 31.05.2016
Parameter
Name | Type | Optional | Description |
---|---|---|---|
err |
(Object or undefined) |
|
Error object |