Versions in this module Expand all Collapse all v1 v1.0.0 Aug 6, 2023 Changes in this version + type Attributes struct + Email string + LastChargeDate time.Time + LastChargeStatus string + PatronStatus string + PledgeRelationshipStart time.Time + type Client struct + Tokens Tokens + func NewClient(config config.Config, logger *zap.Logger, tokens Tokens) *Client + func (c *Client) DoRefresh(ctx context.Context) (Tokens, error) + func (c *Client) FetchPage(ctx context.Context, url string) (PledgeResponse, error) + func (c *Client) FetchPageWithTimeout(ctx context.Context, timeout time.Duration, url string) (PledgeResponse, error) + func (c *Client) FetchPledges(ctx context.Context) (map[string]Patron, error) + type Member struct + Attributes Attributes + Relationships struct{ ... } + type Patron struct + DiscordId *uint64 + Id uint64 + Tiers []Tier + type PatronMetadata struct + Attributes struct{ ... } + Id uint64 + type PledgeResponse struct + Data []Member + Included []PatronMetadata + Links ... + type RefreshResponse struct + AccessToken string + ExpiresIn int64 + RefreshToken string + Scope string + TokenType string + type Tier int + const Premium + const Whitelabel + func GetTierFromId(id uint64) (Tier, bool) + func (i Tier) String() string + type Tokens struct + AccessToken string + ExpiresAt time.Time + RefreshToken string