-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for retrieving Dynamic ESS API data
- Retrieve data from the dynamic ESS api - Add option to store the retrieved data in the global context - Fix a npm test complaint about d_start and d_end not in camelcase
- Loading branch information
1 parent
6699400
commit 33ae045
Showing
3 changed files
with
213 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,23 @@ | ||
module.exports = function (RED) { | ||
'use strict' | ||
function ConfigVRMAPI (config) { | ||
RED.nodes.createNode(this, config); | ||
this.name = config.name; | ||
'use strict' | ||
function ConfigVRMAPI (config) { | ||
RED.nodes.createNode(this, config) | ||
this.name = config.name | ||
|
||
// Transfer data from previous versions | ||
if (this.credentials && !this.credentials.token && config.token) { | ||
RED.nodes.addCredentials(this.id, { token: config.token }); | ||
} | ||
// Transfer data from previous versions | ||
if (this.credentials && !this.credentials.token && config.token) { | ||
RED.nodes.addCredentials(this.id, { token: config.token }) | ||
} | ||
|
||
// Delete deprecated properties | ||
delete config.token; | ||
delete this.token; | ||
// Delete deprecated properties | ||
delete config.token | ||
delete this.token | ||
} | ||
RED.nodes.registerType('config-vrm-api', ConfigVRMAPI, { | ||
credentials: { | ||
token: { | ||
type: 'password' | ||
} | ||
} | ||
RED.nodes.registerType('config-vrm-api', ConfigVRMAPI, { | ||
credentials: { | ||
token: { | ||
type: 'password' | ||
}, | ||
}, | ||
}); | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters