« Back to Product

Documentation

IPS_GetLibraries

 array IPS_GetLibraries (array $LibraryIDs) 

Parameters

LibraryIDs

Array with the LibraryIDs (string). If the array is empty, all libraries are returned

Returns

An array with one entry per library in the order of LibraryIDs. If LibraryIDs is empty, the order of the entries is not guaranteed. Each entry has the same structure as in IPS_GetLibrary.

Description

Warning

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 libraries with the IDs LibraryIDs in one call. If LibraryIDs is empty, all libraries are returned.

Warning

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_GetLibraryList and IPS_GetLibrary.

If an entry of LibraryIDs is not a string, the function fails with "Parameter type of LibraryIDs does not match". If one of the libraries does not exist, the function fails with "Cannot find library with GUID ...".

Example

// Show name and version of all libraries via the JSON-RPC interface
$rpc = new JSONRPC("http://user:password@127.0.0.1:3777/api/");
foreach ($rpc->IPS_GetLibraries([]) as $library) {
    printf("%s: %s (Build %d)\n", $library['Name'], $library['Version'], $library['Build']);
}

/* e.g. returns:
SzenenSteuerung: 1.1 (Build 0)
*/
Any questions?