You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1/2. I was imagining something like filters for pagination mostly, but then you can think about filter by specific property like type, points, etc... or return the only properties that you need by passing something like ?fields=opt1,opt2,opt3... and even put a kinda order by if you want.
If you want, you can take a look at the Angolia example.
api/v2/<resource>?page=2&size=20
{
items: []// it could be "results", "data" or even the resource name in plural too.
meta: {// it could be metadata, _meta, _metadatapage: 2,// or pageNumberper_page: 20,// or "size".... btw default: 30?total_count: 100// or just "total"}}
In the "metadata", you could also include next/prevPage or change all for a more SQL like properties such offset, limit and total.
In the return of the objects you could explore use HATEOAS and also put some sub resources like apì/v2/items/3338485/comments.
Also it's a great opportunity to refactor the application, both code and app structure.
Hey, by now it's possible to collect data from 10 pages and the only filter so far is
page=Number
.In a near future perhaps a good idea could be put some extra filters and also return data about the pagination.
The text was updated successfully, but these errors were encountered: