func (c *Client) GetTXTRecords(domain string, subdomain string) ([]RecordObj, error) {
	call := &methodCall{
		MethodName: "getZoneRecords",
		Params: []param{
			paramString{Value: c.APIUser},
			paramString{Value: c.APIPassword},
			paramString{Value: domain},
			paramString{Value: subdomain},
		},
	}
	resp := &recordObjectsResponse{}
	err := c.rpcCall(call, resp)
	return resp.Params, err
}
GetTXTRecords gets TXT records.
package internal
import (
	"bytes"
	"encoding/xml"
	"errors"
	"fmt"
	"io"
	"net/http"
	"strings"
	"time"
)
const DefaultBaseURL = "https://api.loopia.se/RPCSERV"
type Client struct {
	APIUser     string
	APIPassword string
	BaseURL     string
	HTTPClient  *http.Client
}
func NewClient(apiUser, apiPassword string) *Client {
	return &Client{
		APIUser:     apiUser,
		APIPassword: apiPassword,
		BaseURL:     DefaultBaseURL,
		HTTPClient:  &http.Client{Timeout: 10 * time.Second},
	}
}
func (c *Client) AddTXTRecord(domain string, subdomain string, ttl int, value string) error {
	call := &methodCall{
		MethodName: "addZoneRecord",
		Params: []param{
			paramString{Value: c.APIUser},
			paramString{Value: c.APIPassword},
			paramString{Value: domain},
			paramString{Value: subdomain},
			paramStruct{
				StructMembers: []structMember{
					structMemberString{Name: "type", Value: "TXT"},
					structMemberInt{Name: "ttl", Value: ttl},
					structMemberInt{Name: "priority", Value: 0},
					structMemberString{Name: "rdata", Value: value},
					structMemberInt{Name: "record_id", Value: 0},
				},
			},
		},
	}
	resp := &responseString{}
	err := c.rpcCall(call, resp)
	if err != nil {
		return err
	}
	return checkResponse(resp.Value)
}
func (c *Client) RemoveTXTRecord(domain string, subdomain string, recordID int) error {
	call := &methodCall{
		MethodName: "removeZoneRecord",
		Params: []param{
			paramString{Value: c.APIUser},
			paramString{Value: c.APIPassword},
			paramString{Value: domain},
			paramString{Value: subdomain},
			paramInt{Value: recordID},
		},
	}
	resp := &responseString{}
	err := c.rpcCall(call, resp)
	if err != nil {
		return err
	}
	return checkResponse(resp.Value)
}