Skip to content

Commit

Permalink
Added new resource for get record by name (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
anashamidkh authored and F21 committed Jan 18, 2020
1 parent d02b132 commit e0a4bb9
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions DNSMadeEasy/resource/Domains.php
Expand Up @@ -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");
}
}

0 comments on commit e0a4bb9

Please sign in to comment.