Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Feat: Use only one standardized method for pagination across the API #1358

Closed
Labels
apiArea: HTTP API
@mafredri

Description

@mafredri

What is your suggestion?

We should only use one standardized method of pagination across the API, preferably we'd keep the cursor based pagination and drop support foroffset.

Another approach would be to return pagination metadata in the API responses, for instance, something like:

{"page": {"current_number":2,"total_pages":10,"current":"/api/path?limit=10&after_id=xxx","next":"/api/path?limit=10&after_id=yyy","previous":"/api/path?limit=10&after_id=zzz"  }}

Why do you want this feature?

This was discussed in#1308 and@spikecurtis had good motivations for only keeping one (#1308 (comment)), according to@presleyp it may suffice to only keep cursor based pagination around (#1308 (comment)).

Having two methods for pagination can be confusing and hard to enforce on the API side across all endpoints. It might also add complexity if we introduce more advanced features, like sorting on column.

I think it would be good if@Emyrk had a chance to give his two cents as developer of the original implementation.

The issue described in#1357 may also need to be considered here.

Are there any workarounds to get this functionality today?

No.

Are you interested in submitting a PR for this?

After we have consensus on what approach to take? Sure.

Metadata

Metadata

Assignees

No one assigned

    Labels

    apiArea: HTTP API

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp