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

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

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/>

  • refs
  • ref
  • create_ref
  • update_ref
  • delete_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/>

  • tag
  • create_tag
my $tag = $git_data->tag($sha);
my $tag = $git_data->create_tag($tag_data);

🌳 Trees

<http://developer.github.com/v3/git/trees/>

  • tree
  • trees
  • create_tree
my $tree = $git_data->tree($sha);
my $trees = $git_data->trees($sha);
my $tree = $git_data->create_tree($tree_data);

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 of perl v5.36.0, dated 2022-10-08 β€” slay, periodt, go build something cute with it πŸŽ€βœ¨πŸ¦‹
πŸ“¦ where this page comes from