diff --git a/composer.json b/composer.json index 5a4adac..0b032a2 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "name": "internetx/php-domainrobot-sdk", - "version": "0.9.21", + "version": "0.9.22", "description": "A php package for easy integration of the domainrobot API powered by InterNetX GmbH.", "type": "library", "license": "MIT", diff --git a/src/Service/DocumentService.php b/src/Service/DocumentService.php index ed71b7d..d165c6c 100644 --- a/src/Service/DocumentService.php +++ b/src/Service/DocumentService.php @@ -2,18 +2,20 @@ namespace Domainrobot\Service; -use Domainrobot\Lib\DomainrobotConfig; +use Domainrobot\Domainrobot; use Domainrobot\Lib\DomainrobotPromise; use Domainrobot\Service\DomainrobotService; class DocumentService extends DomainrobotService { - public function info($id) + public function info($id, $fileURI) { - $domainrobotPromise = $this->infoAsync($id); + $domainrobotPromise = $this->infoAsync($id, $fileURI); $domainrobotResult = $domainrobotPromise->wait(); - - return $domainrobotResult; + + Domainrobot::setLastDomainrobotResult($domainrobotResult); + + return $domainrobotResult->getStatusCode(); } /** @@ -22,11 +24,12 @@ public function info($id) * @param int $id * @return DomainrobotPromise */ - public function infoAsync($id) + public function infoAsync($id, $fileURI) { return $this->sendRequest( $this->domainrobotConfig->getUrl() . "/document/$id", - 'GET' + 'GET', + ['sink' => $fileURI] ); } -} +} \ No newline at end of file