Skip to content

Commit

Permalink
Merge pull request #41 from InterNetX/PPM-1714
Browse files Browse the repository at this point in the history
PPM-1714
  • Loading branch information
ChripIX authored Sep 3, 2024
2 parents 7f0b3e8 + 8aece18 commit aa97768
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
19 changes: 11 additions & 8 deletions src/Service/DocumentService.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

/**
Expand All @@ -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]
);
}
}
}

0 comments on commit aa97768

Please sign in to comment.