1Net::GitHub(3) User Contributed Perl Documentation Net::GitHub(3)
2
3
4
6 Net::GitHub - Perl Interface for github.com
7
9 use Net::GitHub;
10
11 my $github = Net::GitHub->new( # Net::GitHub::V2, default
12 owner => 'fayland', repo => 'perl-net-github'
13 );
14
15 # DEPERCATED, for backwards
16 my $github = Net::GitHub->new( # Net::GitHub::V1
17 version => 1,
18 owner => 'fayland', name => 'perl-net-github'
19 );
20
22 <http://github.com> is a popular git host.
23
24 Please feel free to fork
25 http://github.com/fayland/perl-net-github/tree/master
26 <http://github.com/fayland/perl-net-github/tree/master>, fix or
27 contribute some code. :)
28
29 Read Net::GitHub::V2 for more details.
30
31 use Net::GitHub;
32
33 my $github = Net::GitHub->new( # Net::GitHub::V2, default
34 owner => 'fayland', repo => 'perl-net-github',
35 login => 'fayland', token => '54b5197d7f92f52abc5c7149b313cf51', # faked
36 );
37
38 # L<Net::GitHub::V2::Repositories>
39 $github->repos->create( 'sandbox3', 'Sandbox desc', 'http://fayland.org/', 1 );
40 $github->repos->show();
41
42 # L<Net::GitHub::V2::Users>
43 my $followers = $github->user->followers();
44 $github->user->update( name => 'Fayland Lam' );
45
46 # L<Net::GitHub::V2::Commits>
47 my $commits = $github->commit->branch();
48 my $commits = $github->commit->file( 'master', 'lib/Net/GitHub.pm' );
49 my $co_detail = $github->commit->show( $sha1 );
50
51 # L<Net::GitHub::V2::Issues>
52 my $issues = $github->issue->list('open');
53 my $issue = $github->issue->open( 'Bug title', 'Bug detail' );
54 $github->issue->close( $number );
55
56 # L<Net::GitHub::V2::Object>
57 my $tree = $github->obj_tree( $tree_sha1 );
58 my $blob = $github->obj_blob( $tree_sha1, 'lib/Net/GitHub.pm' );
59 my $raw = $github->obj_raw( $sha1 );
60
61 # L<Net::GitHub::V2::Network>
62 $github->network_meta;
63 $github->network_data_chunk( $net_hash );
64
65 # L<Net::GitHub::V2::Organizations>
66 $github->organization->organizations('github');
67 $github->organization->teams('PerlChina');
68
70 http://github.com/fayland/perl-net-github/tree/master
71 <http://github.com/fayland/perl-net-github/tree/master>
72
74 Any::Moose
75
77 Fayland Lam, "<fayland at gmail.com>"
78
80 Copyright 2009 Fayland Lam, all rights reserved.
81
82 This program is free software; you can redistribute it and/or modify it
83 under the same terms as Perl itself.
84
85
86
87perl v5.12.3 2011-03-06 Net::GitHub(3)