Net::G...ultSet(3pm)

πŸ“¦
version 1.05 Β· 3 versions
, in ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ¦‹ NAME πŸ¦‹

Net::GitHub::V3::ResultSet β€” the GitHub query iteration helper, bestie πŸ’–

Like, it's part of the User Contributed Perl Documentation squad, and its whole job is helping you vibe through GitHub results one lil item at a time.


✨ SYNOPSIS ✨

So this one's not for you directly, okay? It's for use by the role Net::GitHub::V3::Query β€” it's the backstage crew, not the main character πŸŽ€

use Net::GitHub::V3::ResultSet;

$result_set = Net::GitHub::V3::ResultSet->new( url => $url );
...

And that's the whole vibe. ... goes here, ... goes there, iconic behavior, no notes πŸ’…


🌸 DESCRIPTION 🌸

okay so real talk: objects in this class are literally just holding the current status of a GitHub query while you're iterating over individual items. That's it. That's the job. 🫢

And the best part? This happens behind the scenes β€” if you're a user of Net::GitHub::V3, you genuinely do not need to know about this class at all. It's giving ✨invisible labor✨. iykyk.

Every single one of the V3 submodules keeps one of these objects for every different pageable query it handles. So yeah, they're kind of everywhere, just quietly doing their thing 🌈


πŸŽ€ The Attributes & What They Actually Do πŸŽ€

  • url β€” Required for creating the object, no exceptions bestie. This is the URL where a pageable GitHub query starts. It gets used to identify the pagination when retrieving the next object, and also for the very first call to the GitHub API. So it's doing double duty, main character energy fr fr πŸ‘‘
  • results β€” An array reference holding the current page, exactly as retrieved by the most recent call to the GitHub API. Fresh off the API, still warm πŸ“
  • cursor β€” An integer pointing to the "next" position within the current page, which is where the next method will fetch an item from. It's literally just a lil pointer being like "you are here πŸ“"
  • done β€” A boolean, and when it's true it means there's no more item to be fetched from the API. The current results are the last. That's it. That's the end of the road, we've hit the wall, pack it up 😭
  • next_url β€” The url from which more results can be fetched. It will be empty if there are no more pages. So an empty next_url = we're done-zo, no more content, the well has run dry πŸ’€
lowkey important: that done flag and an empty next_url are your two lil signals that the iteration is over. don't @ me, that's just how it is 🧚

and that's the whole page, bestie!! πŸ¦‹βœ¨

This lil legend came to you courtesy of perl v5.36.0, dated 2022-10-08 β€” so go forth, iterate responsibly, and remember: the results are always in the results πŸ’–πŸŒΈπŸ’…

πŸ“¦ where this page comes from