JustinLove / elm-twitch-api / Twitch.Kraken.Host

JSON Decoders for the Kraken API at https://api.twitch.tv/kraken/channels/CHANNELID/hosts Note that this is an unofficial API

Use these pieces to pull out the parts your application needs.

import Twitch.Kraken.Host as Host
import Json.Decode exposing (..)

hosts : Decoder (List UserId)
hosts = Host.response Host.hostId

Field decoders

hostId : Json.Decode.Decoder UserId

Id of the channel hosting

targetId : Json.Decode.Decoder UserId

Id of the channel being hosted

Response decoder

response : Json.Decode.Decoder a -> Json.Decode.Decoder (List a)

Decode individual records from the api response using the specified decoder

Sample Data

sampleHost : String

sample data for bootstrapping and testing