src/Commands/AccountCommand.php 1 location
|
@@ 31-40 (lines=10) @@
|
| 28 |
|
$this->addOption('token', null, InputOption::VALUE_REQUIRED, 'Your authentication token'); |
| 29 |
|
} |
| 30 |
|
|
| 31 |
|
protected function execute(InputInterface $input, OutputInterface $output) |
| 32 |
|
{ |
| 33 |
|
$this->client->setAuthToken($input->getOption('token')); |
| 34 |
|
$this->client->doHandshake(); |
| 35 |
|
|
| 36 |
|
$accounts = $this->client->getWebAccounts($input->getArgument('url')); |
| 37 |
|
|
| 38 |
|
$output->writeln(json_encode($accounts)); |
| 39 |
|
return 0; |
| 40 |
|
} |
| 41 |
|
} |
| 42 |
|
|
src/Commands/LoginCommand.php 1 location
|
@@ 30-39 (lines=10) @@
|
| 27 |
|
$this->addOption('token', null, InputOption::VALUE_REQUIRED, 'Your authentication token'); |
| 28 |
|
} |
| 29 |
|
|
| 30 |
|
protected function execute(InputInterface $input, OutputInterface $output) |
| 31 |
|
{ |
| 32 |
|
$this->client->setAuthToken($input->getOption('token')); |
| 33 |
|
$this->client->doHandshake(); |
| 34 |
|
|
| 35 |
|
$logins = $this->client->getLogins(); |
| 36 |
|
|
| 37 |
|
$output->writeln(json_encode($logins)); |
| 38 |
|
return 0; |
| 39 |
|
} |
| 40 |
|
} |
| 41 |
|
|