Comments (1)
We need to be able to paginate api endpoints for proposal lists.
I recommend the approach reddit uses.
A list is sorted in some way (let's assume new)
To get a page, I specify the limit (max number of items returned) and an optional start/end point.
You could have a default limit of 20.
For these examples, assume the list is sorted by newest first.
To get a page of i items I fetch
/vetted?limit=20
To get the next oldest page, I would fetch:
/vetted?limit=20&before=<idofthelastiteminpreviouspage>
A meta key can be added to the response as a sibling to proposals
{
proposals: [...]
meta: { total: 9123 }
}
from politeia.
Related Issues (20)
- pi: Allow RFPs to be censored with invalid metadata.
- pi: Add approved proposal status.
- Slow response on batched pi summaries. HOT 2
- Forbid @ in usernames HOT 2
- [cms] Fresh domain invoices are not shown if using an old month
- politeiavoter: Bunches ignoring interrupt signal.
- comments: Allow retrieving all comment votes.
- Unstable order of data in Proposal Bundle download HOT 6
- comments: Add temporary edits setting. HOT 1
- comments: Add `allowextradata` to the policy reply.
- multi: Add routes page sizes as plugin settings.
- politeiad: MySQL max placeholder limit hit.
- politeiad: Invalid token bug. HOT 4
- tstore: Allow plugins to cache data in the kv store.
- pictl: Return timestamps of all comments when no IDs provided.
- Empty comments are being allowed HOT 1
- mysql/mariadb select statement bug on mac
- Invalidate all sessions of a user on password change
- Cannot Submit Proposal - getting error HOT 1
- Add rate limiting to authenticated password reset HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from politeia.