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.WithOrder(model.DefaultSortingOrder)
|
||||
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()
|
||||
if err != nil {
|
||||
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.WithOrder(model.DefaultSortingOrder)
|
||||
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()
|
||||
if err != nil {
|
||||
logger.Error("[GoogleReader][/stream/items/ids#starred] [ClientIP=%s] %v", clientIP, err)
|
||||
|
|
Loading…
Reference in a new issue