hubcaps icon indicating copy to clipboard operation
hubcaps copied to clipboard

Add `UserGists::iter`, `Gists::iter`

Open envp opened this issue 3 years ago • 1 comments

Return streams of gists, allowing traversing all of the gists that belong to a user or match the given GistListOptions

What did you implement:

Extend the UserGists, Gists impls with an iter() functions that return Stream<Gist>.

How did you verify your change:

I ran the example code that pulls a user's gists, initially it returned only 30 gists, but it returns all of my gists now (when modified to user UserGists::iter()).

The test was run with both the default github endpoint, and an enterprise endpoint.

I'd be happy to add an example demonstrating this as well.

What (if anything) would need to be called out in the CHANGELOG for the next release:

  • Add UserGists::iter(owner, options) to return a stream of gists with the given owner and options.
  • Add Gists::iter(options) to return a stream of gists matching the given options

cc: @softprops @dwijnand

envp avatar Apr 29 '22 19:04 envp

Checking in to see if this PR is still welcome? Thanks for your time!

envp avatar Oct 19 '22 16:10 envp

ping! Is there any interest in this still? Being able to merge this upstream would be really beneficial for what I'm building since it is currently not possible to iterate over a user's gists using the library.

envp avatar Jan 29 '23 18:01 envp