JustinLove/elm-twitch-api/7.0.0

Twitch.Helix.Game

JSON Decoders for Helix Game responses

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

import Twitch.Helix.Game as Game
import Json.Decode exposing (..)


games : Decoder (List Persist.Game)
games = Game.response game


game : Decoder Game
game =
  map3 Game
    Game.id
    Game.name
    Game.boxArtUrl

Field decoders

id : Decoder GameId

Id of the game

name : Decoder String

Name of the game

boxArtUrl : Decoder String

Url for box art images

Response decoder

response : Decoder a -> Decoder (List a)

Decode individual records from the api response using the specified decoder

Sample Data

sampleGame : String

Sample data for games