mirror of
https://github.com/miniflux/v2.git
synced 2025-06-27 16:36:00 +00:00
support date filtering for all google reader api item ID calls
This commit is contained in:
parent
d947b0194b
commit
7a961babd4
1 changed files with 14 additions and 0 deletions
|
@ -1123,6 +1123,13 @@ func (h *handler) handleReadingListStream(w http.ResponseWriter, r *http.Request
|
||||||
builder.WithLimit(rm.Count)
|
builder.WithLimit(rm.Count)
|
||||||
builder.WithOrder(model.DefaultSortingOrder)
|
builder.WithOrder(model.DefaultSortingOrder)
|
||||||
builder.WithDirection(rm.SortDirection)
|
builder.WithDirection(rm.SortDirection)
|
||||||
|
if rm.StartTime > 0 {
|
||||||
|
builder.AfterDate(time.Unix(rm.StartTime, 0))
|
||||||
|
}
|
||||||
|
if rm.StopTime > 0 {
|
||||||
|
builder.BeforeDate(time.Unix(rm.StopTime, 0))
|
||||||
|
}
|
||||||
|
|
||||||
rawEntryIDs, err := builder.GetEntryIDs()
|
rawEntryIDs, err := builder.GetEntryIDs()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
logger.Error("[GoogleReader][/stream/items/ids#reading-list] [ClientIP=%s] %v", clientIP, err)
|
logger.Error("[GoogleReader][/stream/items/ids#reading-list] [ClientIP=%s] %v", clientIP, err)
|
||||||
|
@ -1145,6 +1152,13 @@ func (h *handler) handleStarredStream(w http.ResponseWriter, r *http.Request, rm
|
||||||
builder.WithLimit(rm.Count)
|
builder.WithLimit(rm.Count)
|
||||||
builder.WithOrder(model.DefaultSortingOrder)
|
builder.WithOrder(model.DefaultSortingOrder)
|
||||||
builder.WithDirection(rm.SortDirection)
|
builder.WithDirection(rm.SortDirection)
|
||||||
|
if rm.StartTime > 0 {
|
||||||
|
builder.AfterDate(time.Unix(rm.StartTime, 0))
|
||||||
|
}
|
||||||
|
if rm.StopTime > 0 {
|
||||||
|
builder.BeforeDate(time.Unix(rm.StopTime, 0))
|
||||||
|
}
|
||||||
|
|
||||||
rawEntryIDs, err := builder.GetEntryIDs()
|
rawEntryIDs, err := builder.GetEntryIDs()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
logger.Error("[GoogleReader][/stream/items/ids#starred] [ClientIP=%s] %v", clientIP, err)
|
logger.Error("[GoogleReader][/stream/items/ids#starred] [ClientIP=%s] %v", clientIP, err)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue