setName('api:test-connector') ->setDescription('Test API connector.') ->setHelp('Test API Connector.') ->addArgument('protocol', InputArgument::REQUIRED, 'protocol') ->addArgument('server', InputArgument::REQUIRED, 'server') ->addArgument('api_key', InputArgument::REQUIRED, 'api_key') ->addArgument('secret_key', InputArgument::REQUIRED, 'secret_key'); } protected function execute(InputInterface $input, OutputInterface $output) { $protocol = $input->getArgument('protocol'); $server = $input->getArgument('server'); $api_key = $input->getArgument('api_key'); $secret_key = $input->getArgument('secret_key'); $api = new APIClient($server, $api_key, $secret_key); $api->setProtocol($protocol); $api->get('/capi/test'); } }