Documentation
IPS_GetModules
array IPS_GetModules (array $ModuleIDs)
Parameters
| ModuleIDs | Array with the ModuleIDs (string). If the array is empty, all modules are returned |
Returns
An array with one entry per module in the order of ModuleIDs. If ModuleIDs is empty, the order of the entries is not guaranteed. Each entry has the same structure as in IPS_GetModule.
Description
This function is intended for internal use only and may change or be removed at any time without notice.
The function returns the information of the modules with the IDs ModuleIDs in one call. If ModuleIDs is empty, all modules are returned.
The function is intended to be called through the JSON-RPC interface, e.g. for the display in the console. It is not available in PHP scripts ("This function is not available for PHP") – there the result can be determined with IPS_GetModuleList and IPS_GetModule.
If an entry of ModuleIDs is not a string, the function fails with "Parameter type of ModuleIDs does not match". If one of the modules does not exist, the function fails with "Cannot find module with GUID ...", on an invalid GUID with "ModuleID ... is not a valid GUID".
Example
// Query information about a module via the JSON-RPC interface
$rpc = new JSONRPC("http://user:password@127.0.0.1:3777/api/");
print_r($rpc->IPS_GetModules(["{C3380B6E-2351-4A19-9668-A17960F97E51}"]));
/* e.g. returns:
Array
(
[0] => Array
(
[Aliases] => Array
(
)
[ChildRequirements] => Array
(
)
[Implemented] => Array
(
[0] => {018EF6B5-AB94-40C6-AA53-46943E824ACF}
)
[LibraryID] => {0945206A-47AA-4FDD-9093-99051E410E82}
[Limit] => 0
[ModuleID] => {C3380B6E-2351-4A19-9668-A17960F97E51}
[ModuleName] => ThermoJet
[ModuleType] => 3
[ParentRequirements] => Array
(
[0] => {79827379-F36E-4ADA-8A95-5F8D1DC92FA9}
)
[Prefix] => TJ
[Translation] => Array
(
[de] => Array
(
[ThermoJet] => ThermoJet
)
)
[URL] =>
[Vendor] => ProJet
)
)
*/