Component API
Lua Lib: component
The Component API provides structures, functions and signals for interacting with the network itself like returning network components.
Functions
Component | Component[] proxy(string ids… | string[] ids…)
Generates and returns instances of the network components with the given UUIDs.
You can pass any amount of parameters and each parameter will then have a corresponding return value.
Each parameter can be either a string, or an array of strings.
These strings should then contain just the UUID of a network component.
If a network component cannot be found for a given string, nil will be used for the return.
Otherwise, an instance of the network component will be returned.
If a parameter is a string array, the return value will be an array of network component instances.
- Parameter
-
Name Type Description ids
string
The UUID of the network component.
ids
string[]
A array of UUIDs of the networks components.
- Return Value
-
Name Type Description Component
Component
The lua table representation of the network component.
Nil if the network component with the given ID was not found.
Component[]
Component[]
A array of the lua table representation of the network component.
Entries are Nil if the network component with the given ID was not found.
string[]… findComponent((string query | Class type )…)
Searches the component network for components with the given query or have the given type.
You can pass multiple parameters and each parameter will be handled separately and returns a corresponding return value.
- Parameters
-
Name Type Description query
string
A nick/group query as string used to get a list of component in the network.
type
Class
The type of the components in the network you want to get.
- Return Value
-
Name Type Description string[]…
string[]…
List of network component UUIDs which pass the given nick query or are of the given type.
- Apis
-
Component - Computer - Event - FileSystem