Hype Train
| Function | Returns |
|---|---|
getHypeTrainStatusForBroadcaster | Promise<HypeTrainStatus> |
Functions
getHypeTrainStatusForBroadcaster
twitch.hypeTrain.getHypeTrainStatusForBroadcaster(): Promise<HypeTrainStatus>
Types
HypeTrain
type HypeTrain = {
id: string
broadcasterUserId: string
broadcasterUserLogin: string
broadcasterUserName: string
level: number
total: number
progress: number
goal: number
topContributions: Array<HypeTrainContribution>
sharedTrainParticipants: Array<HypeTrainSharedParticipant>
startedAt: string
expiresAt: string
type: HypeTrainType
isSharedTrain: boolean
}
HypeTrainAllTimeHigh
type HypeTrainAllTimeHigh = {
level: number
total: number
achievedAt: string
}
HypeTrainContribution
type HypeTrainContribution = {
userId: string
userLogin: string
userName: string
type: HypeTrainContributionType
total: number
}
HypeTrainContributionType
type HypeTrainContributionType = "subscription" | "bits" | "other"
HypeTrainSharedParticipant
type HypeTrainSharedParticipant = {
broadcasterUserId: string
broadcasterUserLogin: string
broadcasterUserName: string
}
HypeTrainStatus
type HypeTrainStatus = {
current: HypeTrain | null
allTimeHigh: HypeTrainAllTimeHigh | null
sharedAllTimeHigh: HypeTrainAllTimeHigh | null
}
HypeTrainType
type HypeTrainType = "regular" | "treasure" | "golden_kappa"