JSON Decoders for Helix Stream responses
Use these pieces to pull out the parts your application needs.
import Twitch.Helix.Stream as Stream
import Json.Decode exposing (..)
streams : Decoder (List Stream)
streams = User.response stream
stream : Decoder Stream
stream =
succeed Stream
|> map2 (|>) Stream.id
|> map2 (|>) Stream.userId
|> map2 (|>) Stream.userName
|> map2 (|>) Stream.gameId
|> map2 (|>) Stream.viewerCount
|> map2 (|>) Stream.thumbnailUrl
|> map2 (|>) Stream.titleId of the channel the stream is on
Login of the channel the stream is on
Name of the channel the stream is on
Id of the game currently listed on the stream
Name of the game currently listed on the stream
Title of the stream
Viewer count
Time the stream started
Language code listed on the stream
Current thumbnail image
List of tag ids
Decode individual records from the api response using the specified decoder
Sample data for streams
Id of the stream