public function execute(Command $command)
    {
        if (!$command->isValid()) {
            throw new Exception('Invalid API command supplied');
        }

        $result = $this->curl()->post($this->getUrl($command), $command->getData());
        $type = $this->getResponseType();

        return new Response($result->getData(), $type);
    }
public function execute(Command $command)
    {
        if (!$command->isValid()) {
            throw new Exception('Invalid API command supplied');
        }

        $result = $this->curl()->post($this->getUrl($command), $command->getData());
        $type = $this->getResponseType();

        return new Response($result->getData(), $type);
    }
public function execute ( Command $ command ) { if ( ! $ command -> isValid ( ) ) { throw new Exception ( 'Invalid API command supplied' ) ; } $ result = $ this -> curl ( ) -> post ( $ this -> getUrl ( $ command ) , $ command -> getData ( ) ) ; $ type = $ this -> getResponseType ( ) ; return new Response ( $ result -> getData ( ) , $ type ) ; }
Execute API command.

@param Command $command

@return \DatingVIP\API\Response

@throws \Exception
Execute API command .