Skip to content

Add parameter pageSize for kernel API /api/riff/getRiffCards #10445

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

Closed
suka233 opened this issue Feb 26, 2024 · 1 comment
Closed

Add parameter pageSize for kernel API /api/riff/getRiffCards #10445

suka233 opened this issue Feb 26, 2024 · 1 comment
Assignees
Milestone

Comments

@suka233
Copy link

suka233 commented Feb 26, 2024

新api请求:获取所有闪卡

In what scenarios do you need this feature?

我想要通过api获取所有闪卡,但是有个问题是/api/riff/getRiffCards有个必穿的参数page,这就很难受了,因为我并不知道有多少页。

Describe the optimal solution

目前我测试出来一页有20条,
虽然可以通过首次调用这个接口的返回数据,来计算共多少页,如下图:
image

但是这样未免太麻烦了,计算出来页数之后还要循环调用这个接口才能获得完整的全量数据。

Describe the candidate solution

方案一:更新一下/api/riff/getRiffCards这个接口,改成如果不传递page的话,就返回所有闪卡

方案二:新增一个接口,专门用来获取所有闪卡,/api/riff/getAllRiffCards

Other information

No response

@88250
Copy link
Member

88250 commented Feb 26, 2024

这样,我们加一个参数 pageSize,传大一点就相当于不分页了。

@88250 88250 self-assigned this Feb 26, 2024
@88250 88250 added this to the 3.0.1 milestone Feb 26, 2024
@88250 88250 changed the title 新api请求:获取所有闪卡 Add parameter pageSize for kernel API /api/riff/getRiffCards Feb 26, 2024
88250 added a commit that referenced this issue Feb 26, 2024

Verified

This commit was signed with the committer’s verified signature.
@88250 88250 closed this as completed Feb 26, 2024
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