Avatar

Correct answer by
Employee

This is an example of using AFCSAccount->listRoom() :

$am = new AFCSAccount($accountURL);

$am->login($username, $password);

echo "==== room list for {$accountName} ====\n";

foreach ($am->listRooms() as $r) {

echo "{$r->name}:{$r->desc}:{$r->created->format(DATE_RFC822)}\n";

}

You would need to look at all rooms where $r->desc == "template name". Currently we don't provide a filter for this but I understand how this would be useful.

The alternative is that since you are maintaining a database and use it for room creation, you should store the template information there for quick retrieval. Again, the way we store room informations is designed for fast access to specific rooms, but not for querying possibly long list of rooms.

View solution in original post