JustinLove/elm-twitch-api/7.0.0

Twitch.Helix

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.

Id aliases

type alias UserId =
String

User id

userId : Decoder UserId

User id decoder

type alias ClipId =
String

Clip id Unlike most ids, these are not numbers but slugs witha couple of words.

clipId : Decoder ClipId

Clip id decoder

type alias VideoId =
String

Video id

videoId : Decoder VideoId

Video id decoder

type alias GameId =
String

Game id

gameId : Decoder GameId

Game id decoder

type alias StreamId =
String

Stream id

streamId : Decoder StreamId

Stream id decoder

Time decoders

timeStamp : Decoder Posix

Decode a timestamp value Twitch timestamps are ISO 8601 values, we decode them as Time.Posix

duration : Decoder Int

Decode a duration value of the form 1h23m45s