Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getPosts API change. #1

Open
binyamin555 opened this issue Jan 29, 2023 · 1 comment
Open

getPosts API change. #1

binyamin555 opened this issue Jan 29, 2023 · 1 comment

Comments

@binyamin555
Copy link
Member

Systems with a dynamic amount of entries will usually not provide an API to receive all entries as once, since it may contain such a large amount of entries, it'll crash trying to provide them all.

Moreover, you wouldn't usually want to get all entries at once.

I'd suggest to change the following API to include parameters from where to start (offset) and an amount of entries to get (amount) while limiting the amount to a max value.

https://github.com/xpodev/jsblog/blob/main/packages/core/src/blog.ts#L50-L52

@neriyaco
Copy link
Member

I am aware of that, the API is not nearly complete and I am planning on adding pagination, filtering and sorting to the getPosts

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

No branches or pull requests

2 participants