JustinLove / elm-twitch-api / Twitch.Template

Helpers for filling in image and url templates received from API responses.

imageTemplateUrl : Basics.Int -> Basics.Int -> String -> String

Fills in templates with {width} and {height}.

Twitch.Template.imageTemplateUrl 168 95 stream.thumbnailUrl

imagePercentTemplateUrl : Basics.Int -> Basics.Int -> String -> String

Fills in templates with %{width} and %{height}.

Twitch.Template.imagePercentTemplateUrl 320 180 video.thumbnailUrl