class Robots:
    def __init__(self, client):
        self.client = client

    def list(self):
        """List all robots"""
        return self.client.request("GET", "/iot/devices")

    def get(self, robot_id):
        """Get a specific robot"""
        return self.client.request("GET", f"/iot/devices/{robot_id}")

    def send_command(self, robot_id, command):
        """
        Send a command to a robot
        :param robot_id: The ID of the robot
        :param command: Dictionary, e.g. {'action': 'move', 'payload': {'x': 1}}
        """
        return self.client.request("POST", f"/iot/devices/{robot_id}/commands", json=command)

    def get_status(self, robot_id):
        """Get robot status and telemetry"""
        return self.client.request("GET", f"/iot/devices/{robot_id}/status")
