- Source:
Methods
(static) make_api_call(component_name, func_name, params, cb)
makes an api call by calling # with params
Parameters:
Name | Type | Description |
---|---|---|
component_name |
string | the name of the component to call func_name on |
func_name |
string | the name of the function to call |
params |
Array.<string> | an array of parameters to give to func_name |
cb |
mixedCallback | yields the result of the api call |
- Source:
(static) resolve_component(name, api_keyopt) → {object}
resolves a name of a component and retrieves the actual component
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
name |
string | the name of the component | |
api_key |
string |
<optional> |
the api_key to use when creating the component |
- Source:
Returns:
the component object
- Type
- object
(static) resolve_func(component, func_name) → {function}
retrieves the function with the given name for the given component
Parameters:
Name | Type | Description |
---|---|---|
component |
object | the component object containing the desired function |
func_name |
string | the name of the function to retrieve |
- Source:
Returns:
the function
- Type
- function
(static) resolve_inputs(args)
calls the appropriate command based on the given arguments
Parameters:
Name | Type | Description |
---|---|---|
args |
Array.<string> | and array of arguments |
- Source:
(static) run_script(name)
executes a script in the scripts folder with the given arguments
Parameters:
Name | Type | Description |
---|---|---|
name |
string | the name of the script |
- Source:
(static) set_api_key(api_key)
sets the api key and prints a message on success
Parameters:
Name | Type | Description |
---|---|---|
api_key |
string | the api key to set |
- Source:
(static) show_help()
prints a message explaining the usage of the tool
- Source:
(static) show_version()
prints the name and version number of this tool
- Source:
(static) use_api(args)
reads parameters from stdin (if any), adds them to the list of params, and
makes an api call based on the given args
Parameters:
Name | Type | Description |
---|---|---|
args |
Array.<string> | an array in the form [component, function, parameters] |
- Source: