{{ define "main" }}

Now

{{ $data := dict }} {{ $url := "http://localhost:8000/v1/now" }} {{ with resources.GetRemote $url }} {{ with .Err }} {{ errorf "%s" . }} {{ else }} {{ $data = .Content | transform.Unmarshal }} {{ $data.SummonerName }} -- {{ $data.SummonerLvl }} {{ range $data.RankedMatchs }}

{{ .Champion }} - {{ if .Win }} Victory {{ else }} Defeat {{ end }} - {{ .Kills }}/{{ .Deaths }}/{{ .Assists }}

{{ end }} {{ end }} {{ else }} {{ errorf "Unable to get remote resource %q" $url }} {{ end }} {{ .Content }} {{ end }}