@@ -60,35 +60,33 @@ public function listRecords(
60
60
string $ direction = "" ,
61
61
string $ match = "all "
62
62
): \stdClass {
63
- $ options = [
63
+ $ query = [
64
64
'page ' => $ page ,
65
65
'per_page ' => $ perPage ,
66
66
'match ' => $ match
67
67
];
68
68
69
69
if (!empty ($ type )) {
70
- $ options ['type ' ] = $ type ;
70
+ $ query ['type ' ] = $ type ;
71
71
}
72
72
73
73
if (!empty ($ name )) {
74
- $ options ['name ' ] = $ name ;
74
+ $ query ['name ' ] = $ name ;
75
75
}
76
76
77
77
if (!empty ($ content )) {
78
- $ options ['content ' ] = $ content ;
78
+ $ query ['content ' ] = $ content ;
79
79
}
80
80
81
81
if (!empty ($ order )) {
82
- $ options ['order ' ] = $ order ;
82
+ $ query ['order ' ] = $ order ;
83
83
}
84
84
85
85
if (!empty ($ direction )) {
86
- $ options ['direction ' ] = $ direction ;
86
+ $ query ['direction ' ] = $ direction ;
87
87
}
88
88
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 , []);
92
90
$ body = json_decode ($ user ->getBody ());
93
91
94
92
$ result = new \stdClass ();
@@ -100,7 +98,7 @@ public function listRecords(
100
98
101
99
public function getRecordDetails (string $ zoneID , string $ recordID ): \stdClass
102
100
{
103
- $ user = $ this ->adapter ->get ('zones/ ' . $ zoneID . '/dns_records/ ' . $ recordID , []);
101
+ $ user = $ this ->adapter ->get ('zones/ ' . $ zoneID . '/dns_records/ ' . $ recordID , [], [] );
104
102
$ body = json_decode ($ user ->getBody ());
105
103
return $ body ->result ;
106
104
}
0 commit comments