JustinLove/elm-twitch-api/4.2.0

NOTE: the latest version is 7.0.0

Twitch.Tmi.Decode

Decoders for the TMI API at tmi.twitch.tv/hosts Note that this is an unofficial API, requests should be made with Http.send rather than Twitch.Helix.send. Furthermore, TMI does not provide cross-origin headers, so a cross-origin proxy may be required.

For target=id, does not include target login/display name

type alias HostingTarget =
{ hostId : String
, targetId : String
, hostLogin : String
, hostDisplayName : String
}

Record for decoded host data without target name (target=id)

hostingTarget : Decoder (List HostingTarget)

Json decoder for hosts without target name (target=id)

sampleHost : String

sample data for bootstrapping and testing

Full decode with target login/display name

type alias Host =
{ hostId : String
, targetId : String
, hostLogin : String
, targetLogin : String
, hostDisplayName : String
, targetDisplayName : String
}

Record for decoded host data with target name

hosts : Decoder (List Host)

Json decoder for hosts with target name