From e18a64e7e4eef1a9cf7a4c2fcf1ef54e2651c6e6 Mon Sep 17 00:00:00 2001 From: Darin Randal Date: Mon, 5 Mar 2018 11:38:18 -0500 Subject: [PATCH] MX records need ability to set priority --- src/Endpoints/DNS.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Endpoints/DNS.php b/src/Endpoints/DNS.php index e8d134e..a8aad75 100644 --- a/src/Endpoints/DNS.php +++ b/src/Endpoints/DNS.php @@ -28,6 +28,7 @@ class DNS implements API * @param string $content * @param int $ttl * @param bool $proxied + * @param string $priority * @return bool */ public function addRecord( @@ -36,7 +37,8 @@ class DNS implements API string $name, string $content, int $ttl = 0, - bool $proxied = true + bool $proxied = true, + string $priority = '' ): bool { $options = [ 'type' => $type, @@ -49,6 +51,10 @@ class DNS implements API $options['ttl'] = $ttl; } + if (!empty($priority)) { + $options['priority'] = $priority; + } + $user = $this->adapter->post('zones/' . $zoneID . '/dns_records', [], $options); $body = json_decode($user->getBody());