Skip to content

Commit 1989bc8

Browse files
authored
Merge pull request #17 from motoronik/fix-not-working-api-resource-stats-add-required-param
Add required query param "resolution" in stats resource
2 parents be9fc06 + 03c5f0e commit 1989bc8

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

stat.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@ func (o *statRequest) ToQueryString() string {
2727
query.Add("stat", string(o.Stat))
2828
query.Add("since", strconv.FormatInt(o.Since, 10))
2929
query.Add("until", strconv.FormatInt(o.Until, 10))
30+
31+
if o.Resolution != nil {
32+
query.Add("resolution", string(*o.Resolution))
33+
}
34+
3035
return query.Encode()
3136
}
3237

0 commit comments

Comments
 (0)