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

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

        try {
            $response = $this->_request(
                [
                    'uri' => $uri,
                    'type' => 'post',
                    'data' => $uriData
                ]
            );
        } catch ( \Exception $e ) {
            throw new InvalidException($e->getMessage());
        }

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

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

        try {
            $response = $this->_request(
                [
                    'uri' => $uri,
                    'type' => 'post',
                    'data' => $uriData
                ]
            );
        } catch ( \Exception $e ) {
            throw new InvalidException($e->getMessage());
        }

        return $response->getBody()->getContents();
    }
public function postCommand ( $ name , array $ params = null ) { $ uri = 'command' ; $ uriData = [ 'name' => $ name ] ; if ( $ params != null ) { foreach ( $ params as $ key => $ value ) { $ uriData [ $ key ] = $ value ; } } try { $ response = $ this -> _request ( [ 'uri' => $ uri , 'type' => 'post' , 'data' => $ uriData ] ) ; } catch ( \ Exception $ e ) { throw new InvalidException ( $ e -> getMessage ( ) ) ; } return $ response -> getBody ( ) -> getContents ( ) ; }
Publish a new command for Radarr 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/Radarr/Radarr/wiki

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