Closed
Bug 809528
Opened 12 years ago
Closed 12 years ago
Limit parameter for feed API, with a value of 50 by default
Categories
(developer.mozilla.org Graveyard :: API, defect, P1)
developer.mozilla.org Graveyard
API
Tracking
(Not tracked)
VERIFIED
FIXED
People
(Reporter: openjck, Unassigned)
References
()
Details
(Whiteboard: c=API)
Our feed API should provide an optional parameter for limiting the number of results, with a value of 50 by default.
Reporter | ||
Updated•12 years ago
|
Priority: P1 → P2
Reporter | ||
Updated•12 years ago
|
Priority: P2 → P1
Reporter | ||
Updated•12 years ago
|
Whiteboard: c=API → c=API p=2
Reporter | ||
Updated•12 years ago
|
Whiteboard: c=API p=2 → c=API
Comment 1•12 years ago
|
||
Reference: https://github.com/mozilla/kuma/pull/674/files What's an example URL endpoint for this? I'm not entirely sure where to start with this.
Comment 2•12 years ago
|
||
e.g., http://developer.mozilla.org/en-US/docs/feeds/rss/revisions and http://developer.mozilla.org/en-US/docs/feeds/json/revisions powered by https://github.com/mozilla/kuma/blob/master/apps/wiki/feeds.py#L262
Comment 3•12 years ago
|
||
FWIW, there's currently a hardcoded limit of 100. Should be pretty easy to change that into a default and honor a query param for a different limit. But, make sure to add an upper bound to the limit - say, 1000 or something, so that someone requesting the feed can't use ?limit=999999 and try grabbing ALL the things.
Comment 4•12 years ago
|
||
Actually, another thought I just had from IRC: We can have a low ceiling like 50 or 100 items, as long as we also have an ?offset parameter to facilitate pagination through results. An example use case would be a script that wants to scoop up every page under a certain tag in JSON. It could request 50 results using an offset incrementing by 50, until the results run out.
Comment 5•12 years ago
|
||
Commits pushed to master at https://github.com/mozilla/kuma https://github.com/mozilla/kuma/commit/fdef8f1525197870ff94a5ebb20f59dabd07af27 fix bug 809528 - Add limit param for RSS feeds https://github.com/mozilla/kuma/commit/5e88792488443637af008978f360725422c71fe2 Merge pull request #751 from darkwing/rss-limit-809528 fix bug 809528 - Add limit param for RSS feeds
Updated•12 years ago
|
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Comment 6•12 years ago
|
||
Verified on staging: 50 items by default on https://developer.allizom.org/en-US/docs/feeds/rss/revisions
Comment 7•12 years ago
|
||
Verified FIXED on prod now, too: https://developer.mozilla.org/en-US/docs/feeds/rss/revisions -- defaults to 50 items.
Status: RESOLVED → VERIFIED
Updated•4 years ago
|
Product: developer.mozilla.org → developer.mozilla.org Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•