go-twitch/eventsub/events/charity.go

238 lines
8.9 KiB
Go
Raw Normal View History

2024-03-05 12:14:18 -05:00
package events
import "time"
type CharityDonationEvent struct {
// An ID that identifies the donation. The ID is unique across campaigns.
Id string `json:"id"`
// An ID that identifies the charity campaign.
CampaignId string `json:"campaign_id"`
// An ID that identifies the broadcaster thats running the campaign.
BroadcasterUserId string `json:"broadcaster_user_id"`
// The broadcasters login name.
BroadcasterUserLogin string `json:"broadcaster_user_login"`
// The broadcasters display name.
BroadcasterUserName string `json:"broadcaster_user_name"`
// An ID that identifies the user that donated to the campaign.
UserId string `json:"user_id"`
// The users login name.
UserLogin string `json:"user_login"`
// The users display name.
UserName string `json:"user_name"`
// The charitys name.
CharityName string `json:"charity_name"`
// A description of the charity.
CharityDescription string `json:"charity_description"`
// A URL to an image of the charitys logo. The images type is PNG and its size is 100px X 100px.
CharityLogo string `json:"charity_logo"`
// A URL to the charitys website.
CharityWebsite string `json:"charity_website"`
// An object that contains the amount of money that the user donated.
Amount struct {
// The monetary amount. The amount is specified in the currencys minor unit.
// For example, the minor units for USD is cents, so if the amount is $5.50 USD, value is set to 550.
Value int `json:"value"`
// The number of decimal places used by the currency. For example, USD uses two decimal places.
// Use this number to translate value from minor units to major units by using the formula:
//
// value / 10^decimal_places
DecimalPlaces int `json:"decimal_places"`
// The ISO-4217 three-letter currency code that identifies the type of currency in value.
Currency string `json:"currency"`
} `json:"amount"`
}
type CharityCampaignStartEvent struct {
// An ID that identifies the charity campaign.
Id string `json:"id"`
// An ID that identifies the broadcaster thats running the campaign.
BroadcasterId string `json:"broadcaster_id"`
// The broadcasters login name.
BroadcasterLogin string `json:"broadcaster_login"`
// The broadcasters display name.
BroadcasterName string `json:"broadcaster_name"`
// The charitys name.
CharityName string `json:"charity_name"`
// A description of the charity.
CharityDescription string `json:"charity_description"`
// A URL to an image of the charitys logo. The images type is PNG and its size is 100px X 100px.
CharityLogo string `json:"charity_logo"`
// A URL to the charitys website.
CharityWebsite string `json:"charity_website"`
// An object that contains the current amount of donations that the campaign has received.
CurrentAmount struct {
// The monetary amount. The amount is specified in the currencys minor unit.
// For example, the minor units for USD is cents, so if the amount is $5.50 USD, value is set to 550.
Value int `json:"value"`
// The number of decimal places used by the currency. For example, USD uses two decimal places.
// Use this number to translate value from minor units to major units by using the formula:
//
// value / 10^decimal_places
DecimalPlaces int `json:"decimal_places"`
// The ISO-4217 three-letter currency code that identifies the type of currency in value.
Currency string `json:"currency"`
} `json:"current_amount"`
// An object that contains the campaigns target fundraising goal.
TargetAmount struct {
// The monetary amount. The amount is specified in the currencys minor unit.
// For example, the minor units for USD is cents, so if the amount is $5.50 USD, value is set to 550.
Value int `json:"value"`
// The number of decimal places used by the currency. For example, USD uses two decimal places.
// Use this number to translate value from minor units to major units by using the formula:
//
// value / 10^decimal_places
DecimalPlaces int `json:"decimal_places"`
// The ISO-4217 three-letter currency code that identifies the type of currency in value.
Currency string `json:"currency"`
} `json:"target_amount"`
// The UTC timestamp (in RFC3339 format) of when the broadcaster started the campaign.
StartedAt time.Time `json:"started_at"`
}
type CharityCampaignProgressEvent struct {
// An ID that identifies the charity campaign.
Id string `json:"id"`
// An ID that identifies the broadcaster thats running the campaign.
BroadcasterId string `json:"broadcaster_id"`
// The broadcasters login name.
BroadcasterLogin string `json:"broadcaster_login"`
// The broadcasters display name.
BroadcasterName string `json:"broadcaster_name"`
// The charity's name.
CharityName string `json:"charity_name"`
// A description of the charity.
CharityDescription string `json:"charity_description"`
// A URL to an image of the charitys logo. The images type is PNG and its size is 100px X 100px.
CharityLogo string `json:"charity_logo"`
// A URL to the charitys website.
CharityWebsite string `json:"charity_website"`
// An object that contains the current amount of donations that the campaign has received.
CurrentAmount struct {
// The monetary amount. The amount is specified in the currencys minor unit.
// For example, the minor units for USD is cents, so if the amount is $5.50 USD, value is set to 550.
Value int `json:"value"`
// The number of decimal places used by the currency. For example, USD uses two decimal places.
// Use this number to translate value from minor units to major units by using the formula:
//
// value / 10^decimal_places
DecimalPlaces int `json:"decimal_places"`
// The ISO-4217 three-letter currency code that identifies the type of currency in value.
Currency string `json:"currency"`
} `json:"current_amount"`
// An object that contains the campaigns target fundraising goal.
TargetAmount struct {
// The monetary amount. The amount is specified in the currencys minor unit.
// For example, the minor units for USD is cents, so if the amount is $5.50 USD, value is set to 550.
Value int `json:"value"`
// The number of decimal places used by the currency. For example, USD uses two decimal places.
// Use this number to translate value from minor units to major units by using the formula:
//
// value / 10^decimal_places
DecimalPlaces int `json:"decimal_places"`
// The ISO-4217 three-letter currency code that identifies the type of currency in value.
Currency string `json:"currency"`
} `json:"target_amount"`
}
type CharityCampaignStopEvent struct {
// An ID that identifies the charity campaign.
Id string `json:"id"`
// An ID that identifies the broadcaster that ran the campaign.
BroadcasterId string `json:"broadcaster_id"`
// The broadcasters login name.
BroadcasterLogin string `json:"broadcaster_login"`
// The broadcasters display name.
BroadcasterName string `json:"broadcaster_name"`
// The charity's name
CharityName string `json:"charity_name"`
// A description of the charity.
CharityDescription string `json:"charity_description"`
// A URL to an image of the charitys logo. The images type is PNG and its size is 100px X 100px.
CharityLogo string `json:"charity_logo"`
// A URL to the charitys website.
CharityWebsite string `json:"charity_website"`
// An object that contains the final amount of donations that the campaign received.
CurrentAmount struct {
// The monetary amount. The amount is specified in the currencys minor unit.
// For example, the minor units for USD is cents, so if the amount is $5.50 USD, value is set to 550.
Value int `json:"value"`
// The number of decimal places used by the currency. For example, USD uses two decimal places.
// Use this number to translate value from minor units to major units by using the formula:
//
// value / 10^decimal_places
DecimalPlaces int `json:"decimal_places"`
// The ISO-4217 three-letter currency code that identifies the type of currency in value.
Currency string `json:"currency"`
} `json:"current_amount"`
// An object that contains the campaigns target fundraising goal.
TargetAmount struct {
// The monetary amount. The amount is specified in the currencys minor unit.
// For example, the minor units for USD is cents, so if the amount is $5.50 USD, value is set to 550.
Value int `json:"value"`
// The number of decimal places used by the currency. For example, USD uses two decimal places.
// Use this number to translate value from minor units to major units by using the formula:
//
// value / 10^decimal_places
DecimalPlaces int `json:"decimal_places"`
// The ISO-4217 three-letter currency code that identifies the type of currency in value.
Currency string `json:"currency"`
} `json:"target_amount"`
// The UTC timestamp (in RFC3339 format) of when the broadcaster stopped the campaign.
StoppedAt string `json:"stopped_at"`
}