@@ -60,35 +60,33 @@ public function listRecords(
6060 string $ direction = "" ,
6161 string $ match = "all "
6262 ): \stdClass {
63- $ options = [
63+ $ query = [
6464 'page ' => $ page ,
6565 'per_page ' => $ perPage ,
6666 'match ' => $ match
6767 ];
6868
6969 if (!empty ($ type )) {
70- $ options ['type ' ] = $ type ;
70+ $ query ['type ' ] = $ type ;
7171 }
7272
7373 if (!empty ($ name )) {
74- $ options ['name ' ] = $ name ;
74+ $ query ['name ' ] = $ name ;
7575 }
7676
7777 if (!empty ($ content )) {
78- $ options ['content ' ] = $ content ;
78+ $ query ['content ' ] = $ content ;
7979 }
8080
8181 if (!empty ($ order )) {
82- $ options ['order ' ] = $ order ;
82+ $ query ['order ' ] = $ order ;
8383 }
8484
8585 if (!empty ($ direction )) {
86- $ options ['direction ' ] = $ direction ;
86+ $ query ['direction ' ] = $ direction ;
8787 }
8888
89- $ query = http_build_query ($ options );
90-
91- $ user = $ this ->adapter ->get ('zones/ ' . $ zoneID . '/dns_records? ' . $ query , []);
89+ $ user = $ this ->adapter ->get ('zones/ ' . $ zoneID . '/dns_records ' , $ query , []);
9290 $ body = json_decode ($ user ->getBody ());
9391
9492 $ result = new \stdClass ();
@@ -100,7 +98,7 @@ public function listRecords(
10098
10199 public function getRecordDetails (string $ zoneID , string $ recordID ): \stdClass
102100 {
103- $ user = $ this ->adapter ->get ('zones/ ' . $ zoneID . '/dns_records/ ' . $ recordID , []);
101+ $ user = $ this ->adapter ->get ('zones/ ' . $ zoneID . '/dns_records/ ' . $ recordID , [], [] );
104102 $ body = json_decode ($ user ->getBody ());
105103 return $ body ->result ;
106104 }
0 commit comments