func NewClient(userID, apiKey string) (*Client, error) {
	if userID == "" || apiKey == "" {
		return nil, errors.New("credentials are missing")
	}
	return &Client{
		userID:     userID,
		apiKey:     apiKey,
		baseURL:    baseURL,
		HTTPClient: &http.Client{Timeout: 10 * time.Second},
	}, nil
}
NewClient creates a Client.
package internal
import (
	"bytes"
	"encoding/json"
	"errors"
	"fmt"
	"io"
	"net/http"
	"time"
)
const baseURL = "https://public-api.sonic.net/dyndns"
type APIResponse struct {
	Message string `json:"message"`
	Result  int    `json:"result"`
}
type Record struct {
	UserID   string `json:"userid"`
	APIKey   string `json:"apikey"`
	Hostname string `json:"hostname"`
	Value    string `json:"value"`
	TTL      int    `json:"ttl"`
	Type     string `json:"type"`
}
type Client struct {
	userID     string
	apiKey     string
	baseURL    string
	HTTPClient *http.Client
}