Skip to content

Commit cd2fd73

Browse files
authored
Merge pull request #42 from JorgenPhi/master
AnalyticsDashboard params are not headers
2 parents 99d89e7 + bd83c6d commit cd2fd73

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/Endpoints/Zones.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ public function getZoneID(string $name = ''): string
114114
*/
115115
public function getAnalyticsDashboard(string $zoneID, string $since = '-10080', string $until = '0', bool $continuous = true): \stdClass
116116
{
117-
$response = $this->adapter->get('zones/' . $zoneID . '/analytics/dashboard', [], ['since' => $since, 'until' => $until, 'continuous' => $continuous]);
117+
$response = $this->adapter->get('zones/' . $zoneID . '/analytics/dashboard', ['since' => $since, 'until' => $until, 'continuous' => var_export($continuous, true)], []);
118118

119119
return json_decode($response->getBody())->result;
120120
}

tests/Endpoints/ZonesTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,8 @@ public function testGetAnalyticsDashboard()
141141
->method('get')
142142
->with(
143143
$this->equalTo('zones/c2547eb745079dac9320b638f5e225cf483cc5cfdda41/analytics/dashboard'),
144-
$this->equalTo([]),
145-
$this->equalTo(['since' => '-10080', 'until' => '0', 'continuous' => true])
144+
$this->equalTo(['since' => '-10080', 'until' => '0', 'continuous' => var_export(true, true)]),
145+
$this->equalTo([])
146146
);
147147

148148
$zones = new \Cloudflare\API\Endpoints\Zones($mock);

0 commit comments

Comments
 (0)