Versions in this module Expand all Collapse all v1 v1.0.0 Dec 5, 2026 Changes in this version + const BaseURL + const Version + func VerifySignature(secret, timestamp string, body []byte, signature string, maxAge time.Duration) bool + type AdResult struct + DeliveryID string + MessageID int64 + Reason string + RetryAfter int + Shown bool + type Client struct + func New(apiKey string, opts ...Option) *Client + func (c *Client) Bot(ctx context.Context) (map[string]any, error) + func (c *Client) CheckTasks(ctx context.Context, userID int64, taskIDs []int64) (*Tasks, error) + func (c *Client) Do(ctx context.Context, method, path string, body, out any) error + func (c *Client) Earnings(ctx context.Context) (map[string]any, error) + func (c *Client) GetTasks(ctx context.Context, u User) (*Tasks, error) + func (c *Client) GetTasksLimit(ctx context.Context, u User, limit int) (*Tasks, error) + func (c *Client) SetWebhook(ctx context.Context, url string, rotateSecret bool) (map[string]any, error) + func (c *Client) ShowAd(ctx context.Context, u User, messageID int64) (*AdResult, error) + type Error struct + Code string + Message string + Status int + func (e *Error) Error() string + type Event struct + Event string + Skip bool + Task *Task + Timestamp int64 + UserID int64 + func ParseEvent(body []byte) (*Event, error) + func (e Event) Completed() bool + func (e Event) Refunded() bool + type Option func(*Client) + func WithBaseURL(u string) Option + func WithHTTPClient(h *http.Client) Option + type Task struct + ButtonText string + Currency string + ID int64 + Link string + Payout string + Reward json.RawMessage + Status string + Title string + Type string + Username string + func (t Task) Button() string + func (t Task) Done() bool + type Tasks struct + Earned json.RawMessage + Skip bool + Status string + Tasks []Task + func (t *Tasks) Pending() []Task + type User struct + FirstName string + ID int64 + InitData string + IsPremium bool + LanguageCode string + Username string