8
37
Fork
You've already forked forgejo-api
18

Using pagination helper methods with repo_search()? #153

Open
opened 2026年05月29日 01:28:41 +02:00 by infinoid · 0 comments

Hi,

I'm new to the library, and I saw the Pagination section of the docs. That looks awesome.

I'd like to do something similar to:

forrepoinapi.repo_search(query).stream(){

But the .stream() method isn't found. It seems that it's only present for methods that return Request<'a, E, (H, Vec<T>)>, and .repo_search() returns Request<'_, endpoints::RepoSearch, SearchResults> (no Vec).

The Forgejo endpoint does support pagination, and the Request object does accept the .page() and .page_size() methods. Is there a clever way to make this work, or do I need to iterate pages by hand?

Thanks!

Hi, I'm new to the library, and I saw the [Pagination](https://docs.rs/forgejo-api/latest/forgejo_api/#pagination) section of the docs. That looks awesome. I'd like to do something similar to: ```rust for repo in api.repo_search(query).stream() { ``` But the `.stream()` method isn't found. It seems that it's only present for methods that return `Request<'a, E, (H, Vec<T>)>`, and `.repo_search()` returns `Request<'_, endpoints::RepoSearch, SearchResults>` (no `Vec`). The Forgejo endpoint does support pagination, and the Request object does accept the `.page()` and `.page_size()` methods. Is there a clever way to make this work, or do I need to iterate pages by hand? Thanks!
Sign in to join this conversation.
No Branch/Tag specified
main
docs-ci
pages
v0.11.0
v0.10.0
v0.9.2
v0.9.1
v0.9.0
v0.8.1
v0.8.0
v0.7.0
v0.6.0
v0.5.0
v0.4.1
v0.4.0
v0.3.2
v0.3.1
v0.3.0
v0.2.0
v0.1.0
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Cyborus/forgejo-api#153
Reference in a new issue
Cyborus/forgejo-api
No description provided.
Delete branch "%!s()"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?