1Net::GitHub::V3::GitDatUas(e3r)Contributed Perl DocumentNaetti:o:nGitHub::V3::GitData(3)
2
3
4

NAME

6       Net::GitHub::V3::GitData - GitHub Git DB API
7

SYNOPSIS

9           use Net::GitHub::V3;
10
11           my $gh = Net::GitHub::V3->new; # read L<Net::GitHub::V3> to set right authentication info
12           my $git_data = $gh->git_data;
13

DESCRIPTION

15       To ease the keyboard, we provied two ways to call any method which
16       starts with :user/:repo
17
18       1. SET user/repos before call methods below
19
20           $gh->set_default_user_repo('fayland', 'perl-net-github'); # take effects for all $gh->
21           $git_data->set_default_user_repo('fayland', 'perl-net-github'); # only take effect to $gh->pull_request
22           my $blob = $git_data->blob($sha);
23
24       2. If it is just for once, we can pass :user, :repo before any
25       arguments
26
27           my $blob = $git_data->blob($user, $repo, $sha);
28
29   METHODS
30       Git Data
31
32       <http://developer.github.com/v3/git/>
33
34       Blob
35
36       blob
37               my $blob = $git_data->blob('5a1faac3ad54da26be60970ddbbdfbf6b08fdc57');
38
39       create_blob
40               my $result = $git_data->create_blob( {
41                   content => $content,
42                   encoding => 'utf-8',
43               } );
44
45       Commits
46
47       <http://developer.github.com/v3/git/commits/>
48
49       commit
50               my $commit = $git_data->commit('5a1faac3ad54da26be60970ddbbdfbf6b08fdc57');
51
52       create_commit
53
54       Refs
55
56       <http://developer.github.com/v3/git/refs/>
57
58       refs
59       ref
60       create_ref
61       update_ref
62       delete_ref
63               my @refs = $git_data->refs;
64               my $ref  = $git_data->ref($ref_id);
65               my $ref  = $git_data->create_ref($ref_data);
66               my $ref  = $git_data->update_ref($ref_id, $ref_data);
67               $git_data->delete_ref($ref_id);
68
69       Tags
70
71       <http://developer.github.com/v3/git/tags/>
72
73       tag
74       create_tag
75               my $tag = $git_data->tag($sha);
76               my $tag = $git_data->create_tag($tag_data);
77
78
79
80       <http://developer.github.com/v3/git/trees/>
81
82       tree
83       trees
84       create_tree
85               my $tree = $git_data->tree($sha);
86               my $trees = $git_data->trees($sha);
87               my $tree = $git_data->create_tree($tree_data);
88
90       Refer Net::GitHub
91
92
93
94perl v5.36.0                      2022-10-04       Net::GitHub::V3::GitData(3)
Impressum