protected function execute(InputInterface $input, OutputInterface $output) { $response = $this->apiExecutor->request('POST', 'action', ['name' => $input->getArgument('name'), 'class' => $input->getArgument('class'), 'config' => $this->parseConfig($input->getArgument('config'))]); $output->writeln(""); $output->writeln($response->message); $output->writeln(""); }
protected function execute(InputInterface $input, OutputInterface $output) { $response = $this->apiExecutor->request('POST', 'app', ['userId' => $input->getArgument('userId'), 'status' => $input->getArgument('status'), 'name' => $input->getArgument('name'), 'url' => $input->getArgument('url'), 'parameters' => $input->getArgument('parameters'), 'scopes' => explode(',', $input->getArgument('scopes'))]); $output->writeln(""); $output->writeln($response->message); $output->writeln(""); }
protected function execute(InputInterface $input, OutputInterface $output) { $file = $input->getArgument('file'); if (!is_file($file)) { $output->writeln('Invalid schema file'); return 1; } $response = $this->apiExecutor->request('POST', 'schema', ['name' => $input->getArgument('name'), 'source' => Parser::decode(file_get_contents($file))]); $output->writeln(""); $output->writeln($response->message); $output->writeln(""); }
protected function doRequest($method, $endpoint, $body = null) { return $this->apiExecutor->request($method, $endpoint, $body); }