NAME

Pithub

VERSION

version 0.01000

SYNOPSIS

use Pithub;
use Data::Dumper;

$result = Pithub->new->repos->get( user => 'plu', repo => 'Pithub' );
print Dumper $result->content;

$result = Pithub->new( user => 'plu' )->repos->get( repo => 'Pithub' );
print Dumper $result->content;

$result = Pithub->new( user => 'plu', repo => 'Pithub' )->repos->get;
print Dumper $result->content;

$result = Pithub::Repos->new->get( user => 'plu', repo => 'Pithub' );
print Dumper $result->content;

$result = Pithub::Repos->new( user => 'plu' )->get( repo => 'Pithub' );
print Dumper $result->content;

$result = Pithub::Repos->new( user => 'plu', repo => 'Pithub' )->get;
print Dumper $result->content;

WARNING

Pithub as well as the Github v3 API are still under development. So there might be things broken on both sides. Besides that it's possible that the API will change. This applies to Pithub itself as well as the Github v3 API.

MODULES

There are different ways of using Pithub library. You can either use the main module Pithub to get access to all other modules like Pithub::Repos for example, or you can use Pithub::Repos directly. In the synopsis above, all the calls are equivalent. Here's an overview over all modules and how to get access to them:

Besides that there are other modules involved. Every method call which maps directly to a Github API call returns a Pithub::Result object. This contains everything interesting about the response (Pithub::Response) returned from the API call as well as the request (Pithub::Request). Even the Pithub::Base module might be interesting because this one provides the "request" in Pithub::Base method, which is used by all other modules. In case Github adds a new API call which is not supported yet by Pithub the "request" in Pithub::Base method can be used directly.