def get_rooms(self, sort=True):
rooms = self._connection.get("<STR_LIT>")<EOL>if sort:<EOL><INDENT>rooms.sort(key=operator.itemgetter("<STR_LIT:name>"))<EOL><DEDENT>return rooms<EOL>
Get rooms list.

        Kwargs:
            sort (bool): If True, sort rooms by name

        Returns:
            array. List of rooms (each room is a dict)