<?php
namespace Incoviba\Command;

use Symfony\Component\Console;
use Incoviba\Common\Alias\Command;

#[Console\Attribute\AsCommand(
    name: 'comunas',
    description: 'Obtiene las comunas de una región'
)]
class Comunas extends Command
{
   public function execute(Console\Input\InputInterface $input, Console\Output\OutputInterface $output)
    {
        $this->logger->debug("Running {$this->getName()}");
        $uri = '/api/direcciones/region/13/comunas';
        $output->writeln("GET {$uri}");
        $response = $this->client->get($uri);
        $output->writeln("Response Code: {$response->getStatusCode()}");
        return Console\Command\Command::SUCCESS;
    }
}
