Added new endpoints under /forecast/narrative
All checks were successful
ci/woodpecker/push/build-image Pipeline was successful
All checks were successful
ci/woodpecker/push/build-image Pipeline was successful
This commit is contained in:
20
templates/forecast_narrative.txt.tmpl
Normal file
20
templates/forecast_narrative.txt.tmpl
Normal file
@@ -0,0 +1,20 @@
|
||||
{{- if .Data -}}
|
||||
Narrative Forecast
|
||||
Location ID: {{if .Data.LocationID}}{{.Data.LocationID}}{{else}}n/a{{end}}
|
||||
Location Name: {{if .Data.LocationName}}{{.Data.LocationName}}{{else}}n/a{{end}}
|
||||
Issued At: {{.Data.IssuedAt}}
|
||||
Periods: {{len .Data.Periods}}
|
||||
{{- range $i, $period := .Data.Periods}}
|
||||
|
||||
[{{$i}}] {{$period.StartTime}} -> {{$period.EndTime}}
|
||||
{{- if $period.Name}}
|
||||
Name: {{$period.Name}}
|
||||
{{- end}}
|
||||
Condition Code: {{$period.ConditionCode}}
|
||||
{{- if $period.TextDescription}}
|
||||
Summary: {{$period.TextDescription}}
|
||||
{{- end}}
|
||||
{{- end}}
|
||||
{{- else -}}
|
||||
No narrative forecast data available.
|
||||
{{- end}}
|
||||
Reference in New Issue
Block a user