Net::GitHub::V2::Repositories - GitHub Repositories API
use Net::GitHub::V2::Repositories; my $repos = Net::GitHub::V2::Repositories->new( owner => 'fayland', repo => 'perl-net-github' );
http://develop.github.com/p/repo.html
For those (authentication required) below, you must set login and token (in https://github.com/account
my $repos = Net::GitHub::V2::Repositories->new( owner => 'fayland', repo => 'perl-net-github', login => 'fayland', token => '54b5197d7f92f52abc5c7149b313cf51', # faked );
my $results = $repos->search('net-github');
Search Repositories
my $repos_in_detail = $repos->show(); # show the owner+repo in ->new my $repos_in_detail = $repos->show('fayland', 'foorum'); # another
To look at more in-depth information for a repository
my $repositories = $repos->list(); # show the owner in ->new my $repositories = $repos->list('nothingmuch');
list out all the repositories for a user
$repos->watch(); $repos->unwatch();
watch and unwatch repositories (authentication required)
$repos->fork();
fork a repository (authentication required)
my $rep = $repos->create( $name, $desc, $homepage, $is_public );
create a new repository (authentication required). $name are required. like 'perl-net-github'
$repos->delete(); # just return delete_token $repos->delete( { confirm => 1 } ); # delete the repository
delete a repository (authentication required)
$repos->set_private(); $repos->set_public();
set a public repository private or make a private repo public (authentication required)
$repos->add_deploy_key( 'title', $key ); my $pub_keys = $repos->deploy_keys(); $repos->remove_deploy_key( $pub_keys->[0]->{id} );
list, add and remove your deploy keys (authentication required)
my $collaborators = $repos->collaborators(); $repos->add_collaborator( 'steven' ); $repos->remove_collaborator( 'steven' );
list, add and remove the collaborators on your project (authentication required)
my $network = $repos->network();
List the languages used in a particular repository. Values are in bytes calculated.
my $languages = $repos->languages();
my $tags = $repos->tags();
my $branches = $repos->branches();
Fayland Lam, <fayland at gmail.com>
<fayland at gmail.com>
Copyright 2009 Fayland Lam, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Net::GitHub, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::GitHub
CPAN shell
perl -MCPAN -e shell install Net::GitHub
For more information on module installation, please visit the detailed CPAN module installation guide.