Skip to content

feat: news - direction param (forward paging), offset cap 10000 - #86

Open
alexpipipi wants to merge 1 commit into
mainfrom
feat/DEV-2398-news-direction
Open

alexpipipi wants to merge 1 commit into
mainfrom
feat/DEV-2398-news-direction

Conversation

@alexpipipi

@alexpipipi alexpipipi commented Oct 21, 2026 •

Copy link
Copy Markdown
Member

GET /api/news has a new optional parameter direction, and the offset cap moved from 9000 to 10000.

  • direction=0 (default): newest first, as before.
  • direction=1: articles in the order they entered the database, so a client can page forward with offset without duplicates. from and to are required and the window must not exceed 31 days (both ends counted). Otherwise the API answers 422. Any other value also gives 422.
  • offset max is 10000 and offset + limit must not exceed 10000.

Verified live against the production API on 2026-10-21 (all 422 cases, the 31-day boundary, forward paging with no duplicates, the offset boundaries).

This repo: direction on FinancialNewsAPI.financial_news and the APIClient facade, new tests, CHANGELOG entry under Unreleased. Sent only when given (0 is forwarded if explicit). No client-side validation. No version bump.

Related PRs (same change):

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant