mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Documentation updates for node-red and runtime modules
This commit is contained in:
@@ -17,13 +17,7 @@
|
||||
|
||||
|
||||
var runtime;
|
||||
/**
|
||||
* This module provides the core runtime component of Node-RED.
|
||||
* It does *not* include the Node-RED editor. All interaction with
|
||||
* this module is done using the api provided.
|
||||
*
|
||||
* @namespace RED
|
||||
*/
|
||||
|
||||
var api = module.exports = {
|
||||
init: function(_runtime) {
|
||||
runtime = _runtime;
|
||||
@@ -44,31 +38,10 @@ var api = module.exports = {
|
||||
projects: require("./projects"),
|
||||
context: require("./context"),
|
||||
|
||||
/**
|
||||
* Returns whether the runtime is started
|
||||
* @param {Object} opts
|
||||
* @param {User} opts.user - the user calling the api
|
||||
* @return {Promise<Boolean>} - whether the runtime is started
|
||||
* @memberof RED
|
||||
*/
|
||||
isStarted: function(opts) {
|
||||
return Promise.resolve(runtime.isStarted());
|
||||
},
|
||||
|
||||
/**
|
||||
* Returns version number of the runtime
|
||||
* @param {Object} opts
|
||||
* @param {User} opts.user - the user calling the api
|
||||
* @return {Promise<String>} - the runtime version number
|
||||
* @memberof RED
|
||||
*/
|
||||
version: function(opts) {
|
||||
return Promise.resolve(runtime.version());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* A user accessing the API
|
||||
* @typedef User
|
||||
* @type {object}
|
||||
*/
|
||||
|
Reference in New Issue
Block a user