1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-08-01 17:38:37 +00:00

Update API client to support more filters

This commit is contained in:
Frédéric Guillot 2020-09-14 20:03:24 -07:00
parent 55fad7ea27
commit acd318b640
3 changed files with 61 additions and 0 deletions

View file

@ -480,6 +480,18 @@ func buildFilterQueryString(path string, filter *Filter) string {
values.Set("search", filter.Search)
}
if filter.CategoryID > 0 {
values.Set("category_id", strconv.FormatInt(filter.CategoryID, 10))
}
if filter.FeedID > 0 {
values.Set("feed_id", strconv.FormatInt(filter.FeedID, 10))
}
for _, status := range filter.Statuses {
values.Add("status", status)
}
path = fmt.Sprintf("%s?%s", path, values.Encode())
}