83 lines
2.8 KiB
Go
83 lines
2.8 KiB
Go
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 user’s user id.
|
||
UserId string `json:"user_id"`
|
||
|
||
// The user’s user login.
|
||
UserLogin string `json:"user_login"`
|
||
|
||
// The user’s user display name.
|
||
UserName string `json:"user_name"`
|
||
|
||
// The user’s email address.
|
||
// The event includes the user’s 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 user’s 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 user’s description.
|
||
Description string `json:"description"`
|
||
}
|
||
|
||
type WhisperReceivedEvent struct {
|
||
// The ID of the user sending the message.
|
||
FromUserId string `json:"from_user_id"`
|
||
|
||
// The name of the user sending the message.
|
||
FromUserName string `json:"from_user_name"`
|
||
|
||
// The login of the user sending the message.
|
||
FromUserLogin string `json:"from_user_login"`
|
||
|
||
// The ID of the user receiving the message.
|
||
ToUserId string `json:"to_user_id"`
|
||
|
||
// The name of the user receiving the message.
|
||
ToUserName string `json:"to_user_name"`
|
||
|
||
// The login of the user receiving the message.
|
||
ToUserLogin string `json:"to_user_login"`
|
||
|
||
// The whisper ID.
|
||
WhisperId string `json:"whisper_id"`
|
||
|
||
// Object containing whisper information.
|
||
Whisper struct {
|
||
// The body of the whisper message.
|
||
Text string `json:"text"`
|
||
} `json:"whisper"`
|
||
}
|