238 lines
8.9 KiB
Go
238 lines
8.9 KiB
Go
|
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 that’s running the campaign.
|
|||
|
BroadcasterUserId string `json:"broadcaster_user_id"`
|
|||
|
|
|||
|
// The broadcaster’s login name.
|
|||
|
BroadcasterUserLogin string `json:"broadcaster_user_login"`
|
|||
|
|
|||
|
// The broadcaster’s 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 user’s login name.
|
|||
|
UserLogin string `json:"user_login"`
|
|||
|
|
|||
|
// The user’s display name.
|
|||
|
UserName string `json:"user_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 charity’s logo. The image’s type is PNG and its size is 100px X 100px.
|
|||
|
CharityLogo string `json:"charity_logo"`
|
|||
|
|
|||
|
// A URL to the charity’s 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 currency’s 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 that’s running the campaign.
|
|||
|
BroadcasterId string `json:"broadcaster_id"`
|
|||
|
|
|||
|
// The broadcaster’s login name.
|
|||
|
BroadcasterLogin string `json:"broadcaster_login"`
|
|||
|
|
|||
|
// The broadcaster’s 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 charity’s logo. The image’s type is PNG and its size is 100px X 100px.
|
|||
|
CharityLogo string `json:"charity_logo"`
|
|||
|
|
|||
|
// A URL to the charity’s 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 currency’s 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 campaign’s target fundraising goal.
|
|||
|
TargetAmount struct {
|
|||
|
// The monetary amount. The amount is specified in the currency’s 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 that’s running the campaign.
|
|||
|
BroadcasterId string `json:"broadcaster_id"`
|
|||
|
|
|||
|
// The broadcaster’s login name.
|
|||
|
BroadcasterLogin string `json:"broadcaster_login"`
|
|||
|
|
|||
|
// The broadcaster’s 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 charity’s logo. The image’s type is PNG and its size is 100px X 100px.
|
|||
|
CharityLogo string `json:"charity_logo"`
|
|||
|
|
|||
|
// A URL to the charity’s 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 currency’s 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 campaign’s target fundraising goal.
|
|||
|
TargetAmount struct {
|
|||
|
// The monetary amount. The amount is specified in the currency’s 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 broadcaster’s login name.
|
|||
|
BroadcasterLogin string `json:"broadcaster_login"`
|
|||
|
|
|||
|
// The broadcaster’s 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 charity’s logo. The image’s type is PNG and its size is 100px X 100px.
|
|||
|
CharityLogo string `json:"charity_logo"`
|
|||
|
|
|||
|
// A URL to the charity’s 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 currency’s 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 campaign’s target fundraising goal.
|
|||
|
TargetAmount struct {
|
|||
|
// The monetary amount. The amount is specified in the currency’s 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"`
|
|||
|
}
|