Documentation ¶
Index ¶
- Constants
- type Client
- func (c *Client) GetExtra(purchaseID int) (*Extra, error)
- func (c *Client) GetExtras() (Extras, error)
- func (c *Client) GetMember(subscriptionID int) (*Member, error)
- func (c *Client) GetMembers(status string) (Members, error)
- func (c *Client) GetSupporter(supportID int) (*Supporter, error)
- func (c *Client) GetSupporters() (Supporters, error)
- func (c *Client) Send(method string, endpoint string, body []byte, v interface{}) error
- type Error
- type Extra
- type ExtraItem
- type Extras
- type Member
- type Members
- type Supporter
- type Supporters
Constants ¶
View Source
const API = "https://developers.buymeacoffee.com/api/v1/"
API url
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
Client for Buymeacoffee API
func (*Client) GetMembers ¶
GetMembers returns a slice of BMC subscribers
func (*Client) GetSupporter ¶
GetSupporter returns a BMC supporter by support ID
func (*Client) GetSupporters ¶
func (c *Client) GetSupporters() (Supporters, error)
GetSupporters returns a slice of BMC supporters
type Extra ¶
type Extra struct { Extra ExtraItem `json:"extra"` PayerEmail string `json:"payer_email"` PayerName string `json:"payer_name"` PurchaseAmount string `json:"purchase_amount"` PurchaseCurrency string `json:"purchase_currency"` PurchaseID int `json:"purchase_id"` PurchaseIsRevoked int `json:"purchase_is_revoked"` PurchaseQuestion string `json:"purchase_question"` PurchaseUpdatedOn string `json:"purchase_updated_on"` PurchasedOn string `json:"purchased_on"` }
Extra is a BMC extras purchase
type ExtraItem ¶
type ExtraItem struct { RewardID int `json:"reward_id"` RewardTitle string `json:"reward_title"` RewardDescription string `json:"reward_description"` RewardConfirmationMessage string `json:"reward_confirmation_message"` RewardQuestion string `json:"reward_question"` RewardUsed int `json:"reward_used"` RewardCreatedOn string `json:"reward_created_on"` RewardUpdatedOn string `json:"reward_updated_on"` RewardDeletedOn string `json:"reward_deleted_on"` RewardIsActive int `json:"reward_is_active"` RewardImage string `json:"reward_image"` RewardSlots int `json:"reward_slots"` RewardCoffeePrice string `json:"reward_coffee_price"` RewardOrder int `json:"reward_order"` }
ExtraItem is a BMC extras item
type Member ¶
type Member struct { Country string `json:"country"` IsManualPayout int `json:"is_manual_payout"` MembershipLevelID int `json:"membership_level_id"` MessageVisibility int `json:"message_visibility"` PayerEmail string `json:"payer_email"` PayerName string `json:"payer_name"` Refererr string `json:"referer"` SubscriptionCanceledOn string `json:"subscription_canceled_on"` SubscriptionCoffeeNum int `json:"subscription_coffee_num"` SubscriptionCoffeePrice string `json:"subscription_coffee_price"` SubscriptionCreatedOn string `json:"subscription_created_on"` SubscriptionCurrency string `json:"subscription_currency"` SubscriptionCurrentPeriodEnd string `json:"subscription_current_period_end"` SubscriptionCurrentPeriodStart string `json:"subscription_current_period_start"` SubscriptionDurationType string `json:"subscription_duration_type"` SubscriptionHidden int `json:"subscription_hidden"` SubscriptionID int `json:"subscription_id"` SubscriptionIsCanceled int `json:"subscription_is_canceled"` SubscriptionIsCanceledAtPeriodEnd bool `json:"subscription_is_canceled_at_period_end"` SubscriptionMessage string `json:"subscription_message"` SubscriptionUpdatedOn string `json:"subscription_updated_on"` TransactionID string `json:"transaction_id"` }
Member is a BMC subscriber
type Supporter ¶
type Supporter struct { Country string `json:"country"` IsRefunded int `json:"is_refunded"` PayerEmail string `json:"payer_email"` PayerName string `json:"payer_name"` PaymentPlatform string `json:"payment_platform"` Refererr string `json:"referer"` SupportCoffeePrice string `json:"support_coffee_price"` SupportCoffees int `json:"support_coffees"` SupportCreatedOn string `json:"support_created_on"` SupportCurrency string `json:"support_currency"` SupportEmail string `json:"support_email"` SupportID int `json:"support_id"` SupportNote string `json:"support_note"` SupportNotePinned int `json:"support_note_pinned"` SupportUpdatedOn string `json:"support_updated_on"` SupportVisibility int `json:"support_visibility"` SupporterName string `json:"supporter_name"` TransactionID string `json:"transaction_id"` TransferID string `json:"transfer_id"` }
Supporter is BMC onetime supporter
Click to show internal directories.
Click to hide internal directories.