go-twitch/eventsub/events/users.go

54 lines
2.0 KiB
Go
Raw Normal View History

2024-03-05 12:14:18 -05:00
package events
type UserAuthorizationGrantEvent struct {
// The client_id of the application that was granted user access.
ClientId string `json:"client_id"`
// The user id for the user who has granted authorization for your client id.
UserId string `json:"user_id"`
// The user login for the user who has granted authorization for your client id.
UserLogin string `json:"user_login"`
// The user display name for the user who has granted authorization for your client id.
UserName string `json:"user_name"`
}
type UserAuthorizationRevokeEvent struct {
// The client_id of the application with revoked user access.
ClientId string `json:"client_id"`
// The user id for the user who has revoked authorization for your client id.
UserId string `json:"user_id"`
// The user login for the user who has revoked authorization for your client id. This is null if the user no longer exists.
UserLogin *string `json:"user_login"`
// The user display name for the user who has revoked authorization for your client id. This is null if the user no longer exists.
UserName *string `json:"user_name"`
}
type UserUpdateEvent struct {
// The users user id.
UserId string `json:"user_id"`
// The users user login.
UserLogin string `json:"user_login"`
// The users user display name.
UserName string `json:"user_name"`
// The users email address.
// The event includes the users email address only if the app used to request this event type includes the user:read:email scope for the user;
// otherwise, the field is set to an empty string. See Create EventSub Subscription: https://dev.twitch.tv/docs/api/reference#create-eventsub-subscription
Email string `json:"email"`
// A Boolean value that determines whether Twitch has verified the users email address.
// Is true if Twitch has verified the email address; otherwise, false.
// NOTE: Ignore this field if the email field contains an empty string.
EmailVerified bool `json:"email_verified"`
// The users description.
Description string `json:"description"`
}