From efda0fac119474e9fb9b1bf763c4912ebb0c52f5 Mon Sep 17 00:00:00 2001 From: Stephan Esch Date: Fri, 13 Jan 2017 18:48:56 +0100 Subject: [PATCH] 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 --- lib/api.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/api.js b/lib/api.js index 738de79..f5bf235 100644 --- a/lib/api.js +++ b/lib/api.js @@ -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;