package e621
import "golang.org/x/time/rate"
const (
baseURL = "https://e621.net"
)
// Client represents the e621 API client.
type Client struct {
apiKey string
username string
scheduler *Scheduler
}
// NewClient creates a new e621 API client.
func NewClient(apiKey string, username string) *Client {
scheduler := NewScheduler()
scheduler.SetLimiter(rate.NewLimiter(1, 2))
return &Client{
apiKey: apiKey,
username: username,
scheduler: scheduler,