Ovh\Dedicated\Server\ServerClient::getSecondaryDnsServerInfo PHP Method

getSecondaryDnsServerInfo() public method

Get info about secondary DNS server of $domain2getInfo
public getSecondaryDnsServerInfo ( string $domain, string $domain2getInfo ) : Guzzle\Http\EntityBodyInterface | string
$domain string
$domain2getInfo string
return Guzzle\Http\EntityBodyInterface | string
    public function getSecondaryDnsServerInfo($domain, $domain2getInfo)
    {
        $domain = (string) $domain;
        if (!$domain) {
            throw new BadMethodCallException('Parameter $domain is missing.');
        }
        $domain2getInfo = (string) $domain2getInfo;
        if (!$domain2getInfo) {
            throw new BadMethodCallException('Parameter $domain2getInfo is missing.');
        }
        try {
            $r = $this->get('dedicated/server/' . $domain . '/secondaryDnsDomains/' . $domain2getInfo . '/server')->send();
        } catch (\Exception $e) {
            throw new ServerException($e->getMessage(), $e->getCode(), $e);
        }
        return $r->getBody(true);
    }