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               my @refs = $git_data->refs;
63               my $ref  = $git_data->ref($ref_id);
64               my $ref  = $git_data->create_ref($ref_data);
65               my $ref  = $git_data->update_ref($ref_id, $ref_data);
66
67       Tags
68
69       <http://developer.github.com/v3/git/tags/>
70
71       tag
72       create_tag
73               my $tag = $git_data->tag($sha);
74               my $tag = $git_data->create_tag($tag_data);
75
76
77
78       <http://developer.github.com/v3/git/trees/>
79
80       tree
81       trees
82       create_tree
83               my $tree = $git_data->tree($sha);
84               my $trees = $git_data->trees($sha);
85               my $tree = $git_data->create_tree($tree_data);
86
88       Refer Net::GitHub
89
90
91
92perl v5.32.0                      2020-07-28       Net::GitHub::V3::GitData(3)
Impressum