8000 [pull] main from miniflux:main by pull[bot] · Pull Request #362 · suhaoGe/miniflux · GitHub
[go: up one dir, main page]

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions internal/googlereader/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ Required query parameters:

Optional query parameters:

- `n`: maximum number of items to return
- `n`: maximum number of items to return, capped at 10000
- `c`: numeric offset continuation token
- `r`: sort direction, `o` for ascending, anything else for descending
- `ot`: only items published after this Unix timestamp in seconds
Expand All @@ -437,7 +437,8 @@ Notes:
- exactly one `s` value is expected
- label streams are not supported here
- when `xt` contains the `read` stream, `reading-list` and `feed/<id>` behave as unread-only queries
- if `n` is omitted, the query is effectively unbounded
- if `n` is omitted, or is above 10000 or non-positive, 10000 items are returned at most
- clients must follow `continuation` to retrieve the remaining items
- `continuation` is a numeric offset encoded as a JSON string, not an opaque token

Response shape:
Expand Down
8 changes: 4 additions & 4 deletions internal/googlereader/handler.go
WithLimitAndMaximum(rm.Count, model.MaxEntryIDsLimit).
Original file line number Diff line number Diff line change
Expand Up @@ -1012,7 +1012,7 @@ func (h *greaderHandler) handleReadingListStreamHandler(w http.ResponseWriter, r
)

builder := h.store.NewEntryQueryBuilder(rm.UserID).
WithLimit(rm.Count).
WithOffset(rm.Offset).
WithSorting(model.DefaultSortingOrder, rm.SortDirection)

Expand Down Expand Up @@ -1049,7 +1049,7 @@ func (h *greaderHandler) handleReadingListStreamHandler(w http.ResponseWriter, r
func (h *greaderHandler) handleStarredStreamHandler(w http.ResponseWriter, r *http.Request, rm requestModifiers) {
builder := h.store.NewEntryQueryBuilder(rm.UserID).
WithStarred(true).
WithLimit(rm.Count).
WithLimitAndMaximum(rm.Count, model.MaxEntryIDsLimit).
WithOffset(rm.Offset).
WithSorting(model.DefaultSortingOrder, rm.SortDirection)

Expand All @@ -1073,7 +1073,7 @@ func (h *greaderHandler) handleStarredStreamHandler(w http.ResponseWriter, r *ht
func (h *greaderHandler) handleReadStreamHandler(w http.ResponseWriter, r *http.Request, rm requestModifiers) {
builder := h.store.NewEntryQueryBuilder(rm.UserID).
WithStatuses(model.EntryStatusRead).
WithLimit(rm.Count).
WithLimitAndMaximum(rm.Count, model.MaxEntryIDsLimit).
WithOffset(rm.Offset).
WithSorting(model.DefaultSortingOrder, rm.SortDirection)

Expand Down Expand Up @@ -1125,7 +1125,7 @@ func (h *greaderHandler) handleFeedStreamHandler(w http.ResponseWriter, r *http.

builder := h.store.NewEntryQueryBuilder(rm.UserID).
WithFeedID(feedID).
WithLimit(rm.Count).
WithLimitAndMaximum(rm.Count, model.MaxEntryIDsLimit).
WithOffset(rm.Offset).
WithSorting(model.DefaultSortingOrder, rm.SortDirection)

Expand Down
0