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:
parent
55fad7ea27
commit
acd318b640
3 changed files with 61 additions and 0 deletions
|
@ -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())
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue