Working with Rooms
// get the connector object
SteamConnector connector = SteamConnector.getSteamConnector();
// use help method to get connected and logged in (using user guest and password guest)
if (connectToSteam()) {
try {
// get the room by path
SteamRoom steamroom = (SteamRoom)connector.getObjectByPath("/home/steam");
System.out.println("Listing inventory of "+steamroom.getName());
// get the inventory of the room
SteamObject[] inventory = steamroom.getInventory();
// List the inventory
for (int i = 0; i < inventory.length; i++) {
System.out.println(" "+inventory[i].getName());
}
System.out.println("end of listing.");
} catch (SteamException se) {
System.out.println("Error loading data: "+se.toString());
}
// use help method to disconnect
disconnectFromSteam();
}