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

Pagination details on contents API missing #334

Open
mangelajo opened this issue Jan 1, 2020 · 3 comments
Open

Pagination details on contents API missing #334

mangelajo opened this issue Jan 1, 2020 · 3 comments
Assignees

Comments

@mangelajo
Copy link
Contributor

The GET /api/contents?type= request provides the capability to request by offset/count. But it's impossible to determine how many items exist in the database.

Such information would be helpful to implement pagination on the frontends.

{
  "data": [
    {
        "uuid": "024a5797-e064-4ee0-abe3-415cb6d3ed18",
        "id": 6,
        "slug": "item-id-024a5797-e064-4ee0-abe3-415cb6d3ed18", // customizable
        "timestamp": 1493926453826, // milliseconds since Unix epoch
        "updated": 1493926453826,
        // your content data...,
    }, { ... }
  ],
 "total_count" : 110,
}

I suggest to implement a "total_count" (or any similar name on the response).

I can send a PR for that.

@mangelajo
Copy link
Contributor Author

@nilslice ^ does that make sense?

@nilslice
Copy link
Contributor

nilslice commented Jan 1, 2020

That does make sense, feel free to send the PR. I'll try to get this and your other PR merged by the weekend. Been busy wrapping up 2019! Happy new year!

@mangelajo
Copy link
Contributor Author

mangelajo commented Jan 1, 2020 via email

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

No branches or pull requests

2 participants