cloudflare-php icon indicating copy to clipboard operation
cloudflare-php copied to clipboard

ZoneSettings missing Get all Zone settings method

Open Byidi opened this issue 3 years ago • 0 comments

Hi,

I need to get all the settings for a specific zone, like this endpoint #zone-settings-properties. Which I initially search for in the ZoneSettings class, but I didn't seems to be in this class, neither in the rest of the code.

Is it really missing? Do you plan to add it ?

I was able to get the wanted result by adding this to the ZoneSettings class:

    public function getSettings($zoneID)
    {
        $return = $this->adapter->get(
            'zones/' . $zoneID . '/settings/'
        );
        $body   = json_decode($return->getBody());

        if ($body->success) {
            return $body->result;
        }

        return false;
    }

Byidi avatar Mar 18 '21 13:03 Byidi