Versions in this module Expand all Collapse all v1 v1.0.0 Aug 23, 2026 Changes in this version + const DefaultBaseURL + const DefaultTolerance + const DeliveryHeader + const EventHeader + const SignatureHeader + func Sign(secret string, timestamp int64, body string) string + func VerifySignature(secret, header, body string, tolerance time.Duration) bool + func VerifySignatureAt(secret, header, body string, tolerance time.Duration, now time.Time) bool + func WebhookHandler(secret string, fn func(Payload)) http.HandlerFunc + type APIError struct + Message string + Status int + func (e *APIError) Error() string + type Client struct + BaseURL string + HTTP *http.Client + Token string + func New(token string) *Client + func (c *Client) HasVoted(ctx context.Context, discordID string) (*VoteCheck, error) + func (c *Client) HasVotedByUserID(ctx context.Context, userID string) (*VoteCheck, error) + func (c *Client) Listing(ctx context.Context) (*Listing, error) + func (c *Client) PostStats(ctx context.Context, slug string, stats Stats) error + func (c *Client) Votes(ctx context.Context, limit, page int) ([]Voter, error) + type Listener struct + BaseURL string + MaxBackoff time.Duration + Token string + func NewListener(token string) *Listener + func (l *Listener) Run(ctx context.Context, fn func(VoteEvent)) error + type Listing struct + ID string + Name string + Slug string + Type string + VoteCount int + type Payload struct + DeliveryID string + Event string + Listing struct{ ... } + SentAt string + Streak struct{ ... } + User struct{ ... } + Vote struct{ ... } + type Stats struct + ServerCount int + ShardCount *int + UserCount *int + type VoteCheck struct + ExpiresAt string + Voted bool + VotedAt string + type VoteEvent struct + Name string + Slug string + TargetID string + TargetType string + Type string + UserID string + Username string + VoteCount int + VoteID string + VotedAt string + type Voter struct + ID string + User struct{ ... } + VotedAt string