From e0a4bb96cb6525d4c8b610870f5718388b60c247 Mon Sep 17 00:00:00 2001 From: Muhammad Anas Hamid Date: Sun, 19 Jan 2020 03:26:43 +0500 Subject: [PATCH] Added new resource for get record by name (#11) --- DNSMadeEasy/resource/Domains.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/DNSMadeEasy/resource/Domains.php b/DNSMadeEasy/resource/Domains.php index acea806..d4566f2 100644 --- a/DNSMadeEasy/resource/Domains.php +++ b/DNSMadeEasy/resource/Domains.php @@ -128,4 +128,15 @@ public function update($id, array $config) return $this->_driver->put("/dns/managed", $data); } + + /** + * Search for a specific record in a domain where domainId equals {$id} by the name of {$recordName} and type of {type}. + * @param integer $id + * @param string $recordName + * @param string $type An optional parameter. + * @return \DNSMadeEasy\Result + */ + public function getRecordByName($id, $recordName, $type = "A"){ + return $this->_driver->get("V2.0/dns/managed/$id/records?recordName=$recordName&type=$type"); + } }