glitch/types/subscription

Types

pub type Subscription {
  Subscription(
    id: String,
    subscription_status: SubscriptionStatus,
    subscription_type: SubscriptionType,
    version: String,
    cost: Int,
    condition: Condition,
    transport: Transport,
  )
}

Constructors

  • Subscription(
      id: String,
      subscription_status: SubscriptionStatus,
      subscription_type: SubscriptionType,
      version: String,
      cost: Int,
      condition: Condition,
      transport: Transport,
    )
pub type SubscriptionStatus {
  Enabled
  WebHookCallbackVerificationPending
}

Constructors

  • Enabled
  • WebHookCallbackVerificationPending
pub type SubscriptionType {
  AutomodMessageHold
  AutomodMessageUpdate
  AutomodSettingsUpdate
  AutomodTermsUpdate
  ChannelUpdate
  ChannelFollow
  ChannelAdBreakBegin
  ChannelChatClear
  ChannelChatClearUserMessages
  ChannelChatMessage
  ChannelChatMessageDelete
  ChannelChatNotification
  ChannelChatSettingsUpdate
  ChannelChatUserMessageHold
  ChannelChatUserMessageUpdate
  ChannelSubscribe
  ChannelSubscriptionEnd
  ChannelSubscriptionGift
  ChannelSubscriptionMessage
  ChannelCheer
  ChannelRaid
  ChannelBan
  ChannelUnban
  ChannelUnbanRequestCreate
  ChannelUnbanRequestResolve
  ChannelModerate
  ChannelModeratorAdd
  ChannelModeratorRemove
  ChannelGuestStarSessionBegin
  ChannelGuestStarSessionEnd
  ChannelGuestStarGuestUpdate
  ChannelGuestStarSettingsUpdate
  ChannelPointsAutomaticRewardRedemption
  ChannelPointsCustomRewardAdd
  ChannelPointsCustomRewardUpdate
  ChannelPointsCustomRewardRemove
  ChannelPointsCustomRewardRedemptionAdd
  ChannelPointsCustomRewardRedemptionUpdate
  ChannelPollBegin
  ChannelPollProgress
  ChannelPollEnd
  ChannelPredictionBegin
  ChannelPredictionProgress
  ChannelPredictionLock
  ChannelPredictionEnd
  ChannelSuspiciousUserMessage
  ChannelSuspiciousUserUpdate
  ChannelVIPAdd
  ChannelVIPRemove
  CharityDonation
  CharityCampaignStart
  CharityCampaignProgress
  CharityCampaignStop
  ConduitShardDisabled
  DropEntitlementGrant
  ExtensionBitsTransactionCreate
  GoalBegin
  GoalProgress
  GoalEnd
  HypeTrainBegin
  HypeTrainProgress
  HypeTrainEnd
  ShieldModeBegin
  ShieldModeEnd
  ShoutoutCreate
  ShoutoutReceived
  StreamOnline
  StreamOffline
  UserAuthorizationGrant
  UserAuthorizationRevoke
  UserUpdate
  WhisperReceived
}

Constructors

  • AutomodMessageHold
  • AutomodMessageUpdate
  • AutomodSettingsUpdate
  • AutomodTermsUpdate
  • ChannelUpdate
  • ChannelFollow
  • ChannelAdBreakBegin
  • ChannelChatClear
  • ChannelChatClearUserMessages
  • ChannelChatMessage
  • ChannelChatMessageDelete
  • ChannelChatNotification
  • ChannelChatSettingsUpdate
  • ChannelChatUserMessageHold
  • ChannelChatUserMessageUpdate
  • ChannelSubscribe
  • ChannelSubscriptionEnd
  • ChannelSubscriptionGift
  • ChannelSubscriptionMessage
  • ChannelCheer
  • ChannelRaid
  • ChannelBan
  • ChannelUnban
  • ChannelUnbanRequestCreate
  • ChannelUnbanRequestResolve
  • ChannelModerate
  • ChannelModeratorAdd
  • ChannelModeratorRemove
  • ChannelGuestStarSessionBegin
  • ChannelGuestStarSessionEnd
  • ChannelGuestStarGuestUpdate
  • ChannelGuestStarSettingsUpdate
  • ChannelPointsAutomaticRewardRedemption
  • ChannelPointsCustomRewardAdd
  • ChannelPointsCustomRewardUpdate
  • ChannelPointsCustomRewardRemove
  • ChannelPointsCustomRewardRedemptionAdd
  • ChannelPointsCustomRewardRedemptionUpdate
  • ChannelPollBegin
  • ChannelPollProgress
  • ChannelPollEnd
  • ChannelPredictionBegin
  • ChannelPredictionProgress
  • ChannelPredictionLock
  • ChannelPredictionEnd
  • ChannelSuspiciousUserMessage
  • ChannelSuspiciousUserUpdate
  • ChannelVIPAdd
  • ChannelVIPRemove
  • CharityDonation
  • CharityCampaignStart
  • CharityCampaignProgress
  • CharityCampaignStop
  • ConduitShardDisabled
  • DropEntitlementGrant
  • ExtensionBitsTransactionCreate
  • GoalBegin
  • GoalProgress
  • GoalEnd
  • HypeTrainBegin
  • HypeTrainProgress
  • HypeTrainEnd
  • ShieldModeBegin
  • ShieldModeEnd
  • ShoutoutCreate
  • ShoutoutReceived
  • StreamOnline
  • StreamOffline
  • UserAuthorizationGrant
  • UserAuthorizationRevoke
  • UserUpdate
  • WhisperReceived

Functions

pub fn decoder() -> fn(Dynamic) ->
  Result(Subscription, List(DecodeError))
pub fn subscription_status_decoder() -> fn(Dynamic) ->
  Result(SubscriptionStatus, List(DecodeError))
pub fn subscription_status_from_json(
  json_string: String,
) -> Result(SubscriptionStatus, DecodeError)
pub fn subscription_status_from_string(
  str: String,
) -> Result(SubscriptionStatus, Nil)
pub fn subscription_status_to_json(
  subscription_status: SubscriptionStatus,
) -> Json
pub fn subscription_status_to_string(
  status: SubscriptionStatus,
) -> String
pub fn subscription_type_decoder() -> fn(Dynamic) ->
  Result(SubscriptionType, List(DecodeError))
pub fn subscription_type_from_json(
  json_string: String,
) -> Result(SubscriptionType, DecodeError)
pub fn subscription_type_from_string(
  str: String,
) -> Result(SubscriptionType, Nil)
pub fn subscription_type_to_json(
  subscription_type: SubscriptionType,
) -> Json
pub fn subscription_type_to_string(
  subscription_type: SubscriptionType,
) -> String
Search Document