Added serverVersion to API; bumped API version to 2.2 (#1064)

* Added serverVersion to API; bumped API version to 2.1.1

* Fixed version number to 2.2
This commit is contained in:
Stephan Esch
2017-01-13 18:48:56 +01:00
committed by Khaos Tian
parent 600760884d
commit efda0fac11

View File

@@ -5,6 +5,7 @@ var hapLegacyTypes = require("hap-nodejs/accessories/types.js");
var log = require("./logger")._system;
var User = require("./user").User;
var PlatformAccessory = require("./platformAccessory").PlatformAccessory;
var serverVersion = require("./version");
// The official homebridge API is the object we feed the plugin's exported initializer function.
@@ -20,7 +21,10 @@ function API() {
this._dynamicPlatforms = {}; // this._dynamicPlatforms[pluginName.platformName] = platform constructor
// expose the homebridge API version
this.version = 2.1;
this.version = 2.2;
// expose the homebridge server version
this.serverVersion = serverVersion;
// expose the User class methods to plugins to get paths. Example: homebridge.user.storagePath()
this.user = User;