Franck Cuny > Net-GitHub-0.22 > Net::GitHub::V2::Repositories

Download:
Net-GitHub-0.22.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  2
View/Report Bugs
Module Version: 0.20   Source  

NAME ^

Net::GitHub::V2::Repositories - GitHub Repositories API

SYNOPSIS ^

    use Net::GitHub::V2::Repositories;

    my $repos = Net::GitHub::V2::Repositories->new(
        owner => 'fayland', repo => 'perl-net-github'
    );

DESCRIPTION ^

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
    );

METHODS ^

search
    my $results = $repos->search('net-github');

Search Repositories

show
    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

list
    my $repositories = $repos->list(); # show the owner in ->new
    my $repositories = $repos->list('nothingmuch');

list out all the repositories for a user

watch
unwatch
    $repos->watch();
    $repos->unwatch();

watch and unwatch repositories (authentication required)

fork
    $repos->fork();

fork a repository (authentication required)

create
    my $rep = $repos->create( $name, $desc, $homepage, $is_public );

create a new repository (authentication required). $name are required. like 'perl-net-github'

delete
    $repos->delete(); # just return delete_token
    $repos->delete( { confirm => 1 } ); # delete the repository

delete a repository (authentication required)

set_private
set_public
    $repos->set_private();
    $repos->set_public();

set a public repository private or make a private repo public (authentication required)

deploy_keys
add_deploy_key
remove_deploy_key
    $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)

collaborators
add_collaborator
remove_collaborator
    my $collaborators = $repos->collaborators();
    $repos->add_collaborator( 'steven' );
    $repos->remove_collaborator( 'steven' );

list, add and remove the collaborators on your project (authentication required)

network
    my $network = $repos->network();
languages

List the languages used in a particular repository. Values are in bytes calculated.

    my $languages = $repos->languages();
tags
    my $tags = $repos->tags();
branches
    my $branches = $repos->branches();

AUTHOR ^

Fayland Lam, <fayland at gmail.com>

COPYRIGHT & LICENSE ^

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.

syntax highlighting: