Misc fixes and improvements
* Added request logging to com.noccy.apiclient * Added plugin com.noccy.watcher * Added pipe command and filter support * Fixes and stubs
This commit is contained in:
		@@ -6,6 +6,7 @@ use Spark\Commands\Command;
 | 
			
		||||
use SparkPlug;
 | 
			
		||||
use SparkPlug\Com\Noccy\ApiClient\Api\Method;
 | 
			
		||||
use SparkPlug\Com\Noccy\ApiClient\ApiClientPlugin;
 | 
			
		||||
use SparkPlug\Com\Noccy\ApiClient\Log\RequestData;
 | 
			
		||||
use SparkPlug\Com\Noccy\ApiClient\Request\RequestBuilder;
 | 
			
		||||
use Symfony\Component\Console\Helper\Table;
 | 
			
		||||
use Symfony\Component\Console\Input\InputArgument;
 | 
			
		||||
@@ -129,6 +130,11 @@ class ApiRequestCommand extends Command
 | 
			
		||||
        $output->writeln($separator);
 | 
			
		||||
        $output->writeln(strlen($body)." bytes");
 | 
			
		||||
 | 
			
		||||
        $log = $plugin->getRequestLog("default");
 | 
			
		||||
        $evt = RequestData::fromRequestResponse($request, $response, $input->getArgument('method'));
 | 
			
		||||
        $log->append($evt);
 | 
			
		||||
        $log->flush();
 | 
			
		||||
 | 
			
		||||
        return Command::SUCCESS;
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user