API-Github

 view release on metacpan or  search on metacpan

README.mkdn  view on Meta::CPAN

# SYNOPSIS

    use API::Github;

    my $github = API::Github->new(
        username   => 'USERNAME',
        token      => 'TOKEN',
        identifier => 'APPLICATION NAME',
    );

    $github->debug(1);
    $github->fatal(1);

    my $user = $github->users('h@x0r');
    my $results = $user->fetch;

    # after some introspection

    $user->update( ... );

# DESCRIPTION

README.mkdn  view on Meta::CPAN


The token attribute should be set to the API user's personal access token.

## username

    $github->username;
    $github->username('USERNAME');

The username attribute should be set to the API user's username.

## debug

    $github->debug;
    $github->debug(1);

The debug attribute if true prints HTTP requests and responses to standard out.

## fatal

    $github->fatal;
    $github->fatal(1);

The fatal attribute if true promotes 4xx and 5xx server response codes to
exceptions, a [API::Client::Exception](https://metacpan.org/pod/API::Client::Exception) object.

## retries

lib/API/Github.pm  view on Meta::CPAN

    $headers->header('Content-Type' => 'application/json');

    return $self;

}

method resource (@segments) {

    # build new resource instance
    my $instance = __PACKAGE__->new(
        debug      => $self->debug,
        fatal      => $self->fatal,
        retries    => $self->retries,
        timeout    => $self->timeout,
        user_agent => $self->user_agent,
        identifier => $self->identifier,
        username   => $self->username,
        token      => $self->token,
        version    => $self->version,
    );

lib/API/Github.pm  view on Meta::CPAN

=head1 SYNOPSIS

    use API::Github;

    my $github = API::Github->new(
        username   => 'USERNAME',
        token      => 'TOKEN',
        identifier => 'APPLICATION NAME',
    );

    $github->debug(1);
    $github->fatal(1);

    my $user = $github->users('h@x0r');
    my $results = $user->fetch;

    # after some introspection

    $user->update( ... );

=head1 DESCRIPTION

lib/API/Github.pm  view on Meta::CPAN


The token attribute should be set to the API user's personal access token.

=head2 username

    $github->username;
    $github->username('USERNAME');

The username attribute should be set to the API user's username.

=head2 debug

    $github->debug;
    $github->debug(1);

The debug attribute if true prints HTTP requests and responses to standard out.

=head2 fatal

    $github->fatal;
    $github->fatal(1);

The fatal attribute if true promotes 4xx and 5xx server response codes to
exceptions, a L<API::Client::Exception> object.

=head2 retries



( run in 1.333 second using v1.01-cache-2.11-cpan-49f99fa48dc )