Subscription

@Serializable
data class Subscription(val broadcasterId: String, val broadcasterLogin: String, val broadcasterName: String, val gifterId: String = "", val gifterLogin: String = "", val gifterName: String = "", val isGift: Boolean = false, val tier: String = "", val planName: String = "", val userId: String, val userName: String = "", val userLogin: String = "")

Represents a channel subscription from the Twitch Helix API.

See also

Constructors

Link copied to clipboard
constructor(broadcasterId: String, broadcasterLogin: String, broadcasterName: String, gifterId: String = "", gifterLogin: String = "", gifterName: String = "", isGift: Boolean = false, tier: String = "", planName: String = "", userId: String, userName: String = "", userLogin: String = "")

Properties

Link copied to clipboard
@SerialName(value = "broadcaster_id")
val broadcasterId: String

an ID that identifies the broadcaster.

Link copied to clipboard
@SerialName(value = "broadcaster_login")
val broadcasterLogin: String

the broadcaster's login name.

Link copied to clipboard
@SerialName(value = "broadcaster_name")
val broadcasterName: String

the broadcaster's display name.

Link copied to clipboard
@SerialName(value = "gifter_id")
val gifterId: String

the ID of the user that gifted the subscription to the user. Is an empty string if isGift is false.

Link copied to clipboard
@SerialName(value = "gifter_login")
val gifterLogin: String

the gifter's login name. Is an empty string if isGift is false.

Link copied to clipboard
@SerialName(value = "gifter_name")
val gifterName: String

the gifter's display name. Is an empty string if isGift is false.

Link copied to clipboard
@SerialName(value = "is_gift")
val isGift: Boolean

a Boolean value that determines whether the subscription is a gift subscription. Is true if the subscription was gifted.

Link copied to clipboard
@SerialName(value = "plan_name")
val planName: String

the name of the subscription.

Link copied to clipboard

the type of subscription. Possible values are: 1000 (Tier 1), 2000 (Tier 2), 3000 (Tier 3).

Link copied to clipboard
@SerialName(value = "user_id")
val userId: String

an ID that identifies the subscribing user.

Link copied to clipboard
@SerialName(value = "user_login")
val userLogin: String

the user's login name.

Link copied to clipboard
@SerialName(value = "user_name")
val userName: String

the user's display name.