go-twitch/eventsub/events/drops.go

42 lines
1.3 KiB
Go
Raw Permalink Normal View History

2024-03-05 12:14:18 -05:00
package events
import "time"
type DropEntitlementGrantEvent struct {
// Individual event ID, as assigned by EventSub. Use this for de-duplicating messages.
Id string `json:"id"`
// The entitlement object.
Data []struct {
// The ID of the organization that owns the game that has Drops enabled.
OrganizationId string `json:"organization_id"`
// Twitch category ID of the game that was being played when this benefit was entitled.
CategoryId string `json:"category_id"`
// The category name.
CategoryName string `json:"category_name"`
// The campaign this entitlement is associated with.
CampaignId string `json:"campaign_id"`
// Twitch user ID of the user who was granted the entitlement.
UserId string `json:"user_id"`
// The user display name of the user who was granted the entitlement.
UserName string `json:"user_name"`
// The user login of the user who was granted the entitlement.
UserLogin string `json:"user_login"`
// Unique identifier of the entitlement. Use this to de-duplicate entitlements.
EntitlementId string `json:"entitlement_id"`
// Identifier of the Benefit.
BenefitId string `json:"benefit_id"`
// UTC timestamp in ISO format when this entitlement was granted on Twitch.
CreatedAt time.Time `json:"created_at"`
} `json:"data"`
}