Files
oficial/cli/src/Command/Comunas.php

22 lines
627 B
PHP
Raw Normal View History

2023-11-25 00:56:18 -03:00
<?php
namespace Incoviba\Command;
use Symfony\Component\Console;
2023-11-25 21:38:00 -03:00
use Incoviba\Common\Alias\Command;
2023-11-25 00:56:18 -03:00
#[Console\Attribute\AsCommand(
name: 'comunas'
)]
2023-11-25 21:38:00 -03:00
class Comunas extends Command
2023-11-25 00:56:18 -03:00
{
2023-11-25 21:38:00 -03:00
public function execute(Console\Input\InputInterface $input, Console\Output\OutputInterface $output)
2023-11-25 00:56:18 -03:00
{
2023-11-25 21:38:00 -03:00
$this->logger->debug("Running {$this->getName()}");
2023-11-25 00:56:18 -03:00
$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;
}
}