public function postCommand($name, array $params = null)
    {
        $uri = 'command';
        $uriData = [
            'name' => $name
        ];

        if (is_array($params)) {
        	foreach($params as $key=>$value) {
        		$uriData[$key] = $value;
	        }
        }

        $response = [
            'uri' => $uri,
            'type' => 'post',
            'data' => $uriData
        ];

        return $this->processRequest($response);
    }
public function postCommand($name, array $params = null)
    {
        $uri = 'command';
        $uriData = [
            'name' => $name
        ];

        if (is_array($params)) {
        	foreach($params as $key=>$value) {
        		$uriData[$key] = $value;
	        }
        }

        $response = [
            'uri' => $uri,
            'type' => 'post',
            'data' => $uriData
        ];

        return $this->processRequest($response);
    }
public function postCommand ( $ name , array $ params = null ) { $ uri = 'command' ; $ uriData = [ 'name' => $ name ] ; if ( is_array ( $ params ) ) { foreach ( $ params as $ key => $ value ) { $ uriData [ $ key ] = $ value ; } } $ response = [ 'uri' => $ uri , 'type' => 'post' , 'data' => $ uriData ] ; return $ this -> processRequest ( $ response ) ; }
Publish a new command for Sonarr to run.
These commands are executed asynchronously; use GET to retrieve the current status.

Commands and their parameters can be found here:
https://github.com/Sonarr/Sonarr/wiki/Command#commands

@param $name
@param array|null $params
@return string
Publish a new command for Sonarr to run . These commands are executed asynchronously ; use GET to retrieve the current status .