list dns records

This commit is contained in:
juancwu 2026-01-23 16:55:10 +00:00
commit 04ebd05a8f
5 changed files with 244 additions and 3 deletions

View file

@ -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{