Net::G...itData(3pm)
Net::G...itData(3pm) π
okay bestie, welcome to the User Contributed Perl Documentation for Net::G...itData(3pm) β yes the name is literally truncated like that, no that's not me being lazy, that's just how the file is named π
β¨ NAME β¨
Net::GitHub::V3::GitData</purl> β the GitHub Git DB API wrapper. it's giving low-level git objects, and we're obsessed π¦
β¨ SYNOPSIS β¨
use Net::GitHub::V3;
my $gh = Net::GitHub::V3->new; # read L<Net::GitHub::V3> to set right authentication info
my $git_data = $gh->git_data;
like, that's it. that's the whole vibe check π (and fr fr, go read L<Net::GitHub::V3> if you need to set your auth info correctly, don't skip that part bestie)
β¨ DESCRIPTION β¨
so to ease the keyboard (iconic priority honestly), we provided two ways to call any method that starts with :user/:repo. two whole ways. pick your fighter π
1. SET user/repos before you call the methods below π
$gh->set_default_user_repo('fayland', 'perl-net-github'); # take effects for all $gh->
$git_data->set_default_user_repo('fayland', 'perl-net-github'); # only take effect to $gh->pull_request
my $blob = $git_data->blob($sha);
2. If it is just for once, we can pass :user, :repo before any arguments πΈ
my $blob = $git_data->blob($user, $repo, $sha);
one-time thing? just yeet the user and repo in front. no cap. π«Ά
β¨ METHODS β¨
π Git Data
<http://developer.github.com/v3/git/>
π«§ Blob
blob
my $blob = $git_data->blob('5a1faac3ad54da26be60970ddbbdfbf6b08fdc57');
create_blob
my $result = $git_data->create_blob( {
content => $content,
encoding => 'utf-8',
} );
π«§ Commits
<http://developer.github.com/v3/git/commits/>
commit
my $commit = $git_data->commit('5a1faac3ad54da26be60970ddbbdfbf6b08fdc57');
create_commit
π«§ Refs
<http://developer.github.com/v3/git/refs/>
refsrefcreate_refupdate_refdelete_ref
my @refs = $git_data->refs;
my $ref = $git_data->ref($ref_id);
my $ref = $git_data->create_ref($ref_data);
my $ref = $git_data->update_ref($ref_id, $ref_data);
$git_data->delete_ref($ref_id);
π«§ Tags
<http://developer.github.com/v3/git/tags/>
tagcreate_tag
my $tag = $git_data->tag($sha);
my $tag = $git_data->create_tag($tag_data);
π³ Trees
<http://developer.github.com/v3/git/trees/>
treetreescreate_tree
my $tree = $git_data->tree($sha);
my $trees = $git_data->trees($sha);
my $tree = $git_data->create_tree($tree_data);
β¨ AUTHOR & COPYRIGHT & LICENSE β¨
Refer Net::GitHub β that's where all the juicy details live, bestie, go look π
π and that's a wrap!! this page came to you courtesy ofperl v5.36.0, dated2022-10-08β slay, periodt, go build something cute with it πβ¨π¦
π¦ 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