go-twitch/eventsub/events/gueststar.go

160 lines
6.2 KiB
Go
Raw Permalink Normal View History

2024-03-05 12:14:18 -05:00
package events
import "time"
type ChannelGuestStarSessionBeginEvent struct {
// The broadcaster user ID.
BroadcasterUserID string `json:"broadcaster_user_id"`
// The broadcaster display name.
BroadcasterUserName string `json:"broadcaster_user_name"`
// The broadcaster login.
BroadcasterUserLogin string `json:"broadcaster_user_login"`
// ID representing the unique session that was started.
SessionID string `json:"session_id"`
// RFC3339 timestamp indicating the time the session began.
StartedAt time.Time `json:"started_at"`
}
type ChannelGuestStarSessionEndEvent struct {
// The non-host broadcaster user ID.
BroadcasterUserID string `json:"broadcaster_user_id"`
// The non-host broadcaster display name.
BroadcasterUserName string `json:"broadcaster_user_name"`
// The non-host broadcaster login.
BroadcasterUserLogin string `json:"broadcaster_user_login"`
// ID representing the unique session that was started.
SessionID string `json:"session_id"`
// RFC3339 timestamp indicating the time the session began.
StartedAt time.Time `json:"started_at"`
// RFC3339 timestamp indicating the time the session ended.
EndedAt time.Time `json:"ended_at"`
// User ID of the host channel.
HostUserID string `json:"host_user_id"`
// The host display name.
HostUserName string `json:"host_user_name"`
// The host login.
HostUserLogin string `json:"host_user_login"`
}
type ChannelGuestStarGuestUpdateEvent struct {
// The non-host broadcaster user ID.
BroadcasterUserID string `json:"broadcaster_user_id"`
// The non-host broadcaster display name.
BroadcasterUserName string `json:"broadcaster_user_name"`
// The non-host broadcaster login.
BroadcasterUserLogin string `json:"broadcaster_user_login"`
// ID representing the unique session that was started.
SessionID string `json:"session_id"`
// The user ID of the moderator who updated the guest's state (could be the host). null if the update was performed by the guest.
ModeratorUserID *string `json:"moderator_user_id"`
// The moderator display name. null if the update was performed by the guest.
ModeratorUserName *string `json:"moderator_user_name"`
// The moderator login. null if the update was performed by the guest.
ModeratorUserLogin *string `json:"moderator_user_login"`
// The user ID of the guest who transitioned states in the session. null if the slot is now empty.
GuestUserID *string `json:"guest_user_id"`
// The guest display name. null if the slot is now empty.
GuestUserName *string `json:"guest_user_name"`
// The guest login. null if the slot is now empty.
GuestUserLogin *string `json:"guest_user_login"`
// The ID of the slot assignment the guest is assigned to. null if the guest is in the INVITED, REMOVED, READY, or ACCEPTED state.
SlotID *string `json:"slot_id"`
// The current state of the user after the update has taken place. null if the slot is now empty. Can otherwise be one of the following:
//
// invited — The guest has transitioned to the invite queue. This can take place when the guest was previously assigned a slot,
// but have been removed from the call and are sent back to the invite queue.
//
// accepted — The guest has accepted the invite and is currently in the process of setting up to join the session.
//
// ready — The guest has signaled they are ready and can be assigned a slot.
//
// backstage — The guest has been assigned a slot in the session, but is not currently seen live in the broadcasting software.
//
// live — The guest is now live in the host's broadcasting software.
//
// removed — The guest was removed from the call or queue.
//
// accepted — The guest has accepted the invite to the call.
State *string `json:"state"`
// The user ID of the host channel.
HostUserID string `json:"host_user_id"`
// The host display name.
HostUserName string `json:"host_user_name"`
// The host login.
HostUserLogin string `json:"host_user_login"`
// Flag that signals whether the host is allowing the slot's video to be seen by participants within the session.
// null if the guest is not slotted.
HostVideoEnabled *bool `json:"host_video_enabled"`
// Flag that signals whether the host is allowing the slot's audio to be heard by participants within the session.
// null if the guest is not slotted.
HostAudioEnabled *bool `json:"host_audio_enabled"`
// Value between 0-100 that represents the slot's audio level as heard by participants within the session.
// null if the guest is not slotted.
HostVolume *int `json:"host_volume"`
}
type ChannelGuestStarSettingsUpdateEvent struct {
// The user ID of the host channel.
BroadcasterUserID string `json:"broadcaster_user_id"`
// The broadcaster display name.
BroadcasterUserName string `json:"broadcaster_user_name"`
// The broadcaster login.
BroadcasterUserLogin string `json:"broadcaster_user_login"`
// Flag determining if Guest Star moderators have access to control whether a guest is live once assigned to a slot.
IsModeratorSendLiveEnabled bool `json:"is_moderator_send_live_enabled"`
// Number of slots the Guest Star call interface will allow the host to add to a call.
SlotCount int `json:"slot_count"`
// Flag determining if browser sources subscribed to sessions on this channel should output audio
IsBrowserSourceAudioEnabled bool `json:"is_browser_source_audio_enabled"`
// This setting determines how the guests within a session should be laid out within a group browser source. Can be one of the following values:
//
// tiled — All live guests are tiled within the browser source with the same size.
//
// screenshare — All live guests are tiled within the browser source with the same size.
// If there is an active screen share, it is sized larger than the other guests.
//
// horizontal_top — Indicates the group layout will contain all participants in a top-aligned horizontal stack.
//
// horizontal_bottom — Indicates the group layout will contain all participants in a bottom-aligned horizontal stack.
//
// vertical_left — Indicates the group layout will contain all participants in a left-aligned vertical stack.
//
// vertical_right — Indicates the group layout will contain all participants in a right-aligned vertical stack.
GroupLayout string `json:"group_layout"`
}