JSON Decoders for Helix Subscription responses
Use these pieces to pull out the parts your application needs.
import Twitch.Helix.Subscription as Subscription
import Json.Decode exposing (..)
subs : Decoder (List Sub)
subs = Follow.response sub
sub : Decoder Sub
sub =
map3 Sub
Subscription.userId
Subscription.userName
(map planPoints Subscription.tier)Login channel subscribed to
Name channel subscribed to
Id person who gifted the sub, if this is a gift sub
Login person who gifted the sub, if this is a gift sub
Name person who gifted the sub, if this is a gift sub
Whether the sub is a gift
Sub tier, as received from Twitch; we don't do any further translation.
Name of the sub tier
Id of the user subscribed
Name of the user subscribed
Login of the user subscribed
Decode individual records from the api response using the specified decoder
Sample data for subscriptions
Id channel subscribed to