Types and JSON Decoders for common Helix types
Most ids are numbers as strings; the library uses an aliased string with a custom name for documentation purposes, but treats the ids as opaque tokens.
String
User id
userId : Json.Decode.Decoder UserId
User id decoder
String
Clip id Unlike most ids, these are not numbers but slugs witha couple of words.
clipId : Json.Decode.Decoder ClipId
Clip id decoder
String
Video id
videoId : Json.Decode.Decoder VideoId
Video id decoder
String
Game id
gameId : Json.Decode.Decoder GameId
Game id decoder
String
Stream id
streamId : Json.Decode.Decoder StreamId
Stream id decoder
timeStamp : Json.Decode.Decoder Time.Posix
Decode a timestamp value Twitch timestamps are ISO 8601 values, we decode them as Time.Posix
duration : Json.Decode.Decoder Basics.Int
Decode a duration value of the form 1h23m45s