File tree Expand file tree Collapse file tree 3 files changed +25
-5
lines changed
Expand file tree Collapse file tree 3 files changed +25
-5
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " internetx/php-domainrobot-sdk" ,
3- "version" : " 0.9.23 " ,
3+ "version" : " 0.9.24 " ,
44 "description" : " A php package for easy integration of the domainrobot API powered by InterNetX GmbH." ,
55 "type" : " library" ,
66 "license" : " MIT" ,
Original file line number Diff line number Diff line change 1+ <?php
2+ require_once "vendor/autoload.php " ;
3+
4+ use Domainrobot \Domainrobot ;
5+ use Domainrobot \Lib \DomainrobotAuth ;
6+
7+ $ domainrobot = new Domainrobot ([
8+ 'url ' => "https://api.autodns.com/v1 " ,
9+ 'auth ' => new DomainrobotAuth ([
10+ 'user ' => 'USER ' ,
11+ 'password ' => 'PASS ' ,
12+ 'context ' => 4
13+ ])
14+ ]);
15+
16+
17+ $ targetFolder = 'path/to/folder/ ' ;
18+ $ targetFile = 'price_list.xml ' ;
19+
20+ $ domainrobot ->document ->info ('price_list.xml ' , $ targetFolder . $ targetFile );
Original file line number Diff line number Diff line change 88
99class DocumentService extends DomainrobotService
1010{
11- public function info ($ id , $ fileURI )
11+ public function info ($ id , $ targetFileURI )
1212 {
13- $ domainrobotPromise = $ this ->infoAsync ($ id , $ fileURI );
13+ $ domainrobotPromise = $ this ->infoAsync ($ id , $ targetFileURI );
1414 $ domainrobotResult = $ domainrobotPromise ->wait ();
1515
1616 Domainrobot::setLastDomainrobotResult ($ domainrobotResult );
1717
1818 return $ domainrobotResult ->getStatusCode ();
1919 }
2020
21- public function infoAsync ($ id , $ fileURI )
21+ public function infoAsync ($ id , $ targetFileURI )
2222 {
2323 return $ this ->sendRequest (
2424 $ this ->domainrobotConfig ->getUrl () . "/document/ $ id " ,
2525 'GET ' ,
26- ['sink ' => $ fileURI ]
26+ ['sink ' => $ targetFileURI ]
2727 );
2828 }
2929}
You can’t perform that action at this time.
0 commit comments