From d6f0eada8c935acc17e261e970d32635d7834fd8 Mon Sep 17 00:00:00 2001 From: Wesley Vestjens Date: Wed, 16 Jan 2019 21:43:58 +0100 Subject: [PATCH] Add getZoneById($zoneId) method --- src/Endpoints/Zones.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/Endpoints/Zones.php b/src/Endpoints/Zones.php index 8595cb6..1bd9ff7 100644 --- a/src/Endpoints/Zones.php +++ b/src/Endpoints/Zones.php @@ -58,6 +58,15 @@ class Zones implements API return false; } + public function getZoneById( + string $zoneId + ): \stdClass { + $user = $this->adapter->get('zones/' . $zoneId); + $this->body = json_decode($user->getBody()); + + return (object)['result' => $this->body->result]; + } + public function listZones( string $name = '', string $status = '',