Net::G...:Users(3pm)
π NAME π
Okay bestie, so this page is Net::G...:Users(3pm) β it's from the User Contributed Perl Documentation and it's literally the whole GitHub Users API wrapped up in Perl for you. Net::GitHub::V3::Users, periodt. π
β¨ SYNOPSIS β¨
No thoughts, just vibes, just code:
use Net::GitHub::V3;
my $gh = Net::GitHub::V3->new; # read L<Net::GitHub::V3> to set right authentication info
my $user = $gh->user;
Quick heads-up queen: you gotta read Net::GitHub::V3 to set right authentication info. Do that first, or nothing's gonna hit. π«Ά
π¦ DESCRIPTION π¦
π METHODS π
π Users
The link, unchanged, no cap: <http://developer.github.com/v3/users/>
showβ pulls the user info, and yes it can be your own little profile or somebody else's, your call:
my $uinfo = $user->show(); # /user
my $uinfo = $user->show( 'nothingmuch' ); # /users/:user
updateβ glow-up time, change your own stuff:
$user->update(
bio => 'another Perl programmer and Father',
);
π Emails
Link again, exactly as it is: <http://developer.github.com/v3/users/emails/>
The squad of methods: emails, add_email, remove_email.
$user->add_email( 'another@email.com' );
$user->add_email( 'batch1@email.com', 'batch2@email.com' );
my $emails = $user->emails;
while ($email = $user->next_email) { ...; }
$user->remove_email( 'another@email.com' );
$user->remove_email( 'batch1@email.com', 'batch2@email.com' );
Not me noticing add_email and remove_email will happily take a whole batch of addresses at once. Obsessed. β¨
π¦ Followers
The URL, untouched: <http://developer.github.com/v3/users/followers/>
The lineup: followers, following, next_follower, next_following.
my $followers = $user->followers;
my $followers = $user->followers($user);
my $following = $user->following;
my $following = $user->following($user);
my $next_follower = $user->next_follower
my $next_follower = $user->next_follower($user)
my $next_following = $user->next_following
my $next_following = $user->next_following($user)
is_followingβ the vibe check, mutuals check, "are they following this person" check:
my $is_following = $user->is_following($user);
followandunfollowβ the follow/unfollow, the classic main character move:
$user->follow( 'nothingmuch' );
$user->unfollow( 'nothingmuch' );
πΈ Keys
The link, as-is: <http://developer.github.com/v3/users/keys/>
The whole roster: keys, key, create_key, update_key, delete_key.
my $keys = $user->keys;
while (my $key = $user->next_key) { ...; }
my $key = $user->key($key_id); # get key
$user->create_key({
title => 'title',
key => $key
});
$user->update_key($key_id, {
title => $title,
key => $key
});
$user->delete_key($key_id);
π contributions
contributionsβ the little graph detective:
my $contributions = $user->contributions($username);
# $contributions = ( ..., ['2013/09/22', 3], [ '2013/09/23', 2 ] )
Okay so here's the lore π§: this is an Unpublished GitHub API used to build the 'Public contributions' graph on a users' profile page. The data structure is a list of 365 arrayrefs, one per day. Each array has two elements, the date in YYYY/MM/DD format is the first element, the second is the number of contrubtions for that day.stree .
Bestie, that last bit is word-for-word what the page says β day.stree . and all. I am NOT editing it. It's giving haunted. π
π«Ά AUTHOR & COPYRIGHT & LICENSE π«Ά
Refer Net::GitHub.
And that's the whole page, angel! π It was Net::G...:Users(3pm), a piece of the User Contributed Perl Documentation, dated 2022-10-08, built for perl v5.36.0. Go forth and slay those API calls, mwah. ππ
π¦ where this page comes from
- ubuntu noble: libnet-github-perl 1.05-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libnet-github-perl 1.05-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libnet-github-perl 1.05-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms