list dns records
This commit is contained in:
parent
8498f6f0a7
commit
04ebd05a8f
5 changed files with 244 additions and 3 deletions
|
|
@ -48,6 +48,23 @@ func (c *Client) DomainListAll(start int, includeLabels bool) (*DomainListAllRes
|
|||
return &resp, nil
|
||||
}
|
||||
|
||||
func (c *Client) RetrieveDNSRecords(domain string) (*DNSRecordsResponse, error) {
|
||||
reqBody := DNSRecordsRequest{
|
||||
BaseRequest: BaseRequest{
|
||||
APIKey: c.APIKey,
|
||||
SecretAPIKey: c.SecretAPIKey,
|
||||
},
|
||||
}
|
||||
|
||||
var resp DNSRecordsResponse
|
||||
err := c.post("/dns/retrieve/"+domain, reqBody, &resp)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return &resp, nil
|
||||
}
|
||||
|
||||
func (c *Client) Ping() (*PingResponse, error) {
|
||||
reqBody := PingRequest{
|
||||
BaseRequest: BaseRequest{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue