Yanick Champoux > WWW-Ohloh-API-v0.3.2 > WWW::Ohloh::API::Repository

Download:
WWW-Ohloh-API-v0.3.2.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  1
View/Report Bugs
Module Version: v0.3.2   Source  

NAME ^

WWW::Ohloh::API::Repository - A code repository

SYNOPSIS ^

    use WWW::Ohloh::API;

    my $ohloh = WWW::Ohloh::API->new( api_key => $my_api_key );
    my @enlistments = $ohloh->get_enlistments( 
        project_id => 12933,
    );
    my @repository = map { $_->repository } @enlistments;

DESCRIPTION ^

W::O::A::Repository contains the information associated with a code repository as defined at http://www.ohloh.net/api/reference/repository.

METHODS ^

API Data Accessors

id

    my $id = $repository->id;

Return the id of the repository.

type

    my $is_git = $repository->type eq 'GitRepository';

Return the type of the repository, which can be either SvnRepository, CvsRepository or GitRepository.

url

Return the repository's public url as a URI object. If you just want the url, don't be scared by that: URI objects are stringified into what you expect. E.g.:

    my $url = $repository->url;
    print $url;  # will print a good ol' "http://..." string

module_name

    my $module = $repository->module_name;

For CVS repositories, return the name of the module.

username, password

    my $user     = $repository->username;
    my $password = $repository->password;

Return, if necessary, the username / password required to log to the repository.

logged_at

    my $last = $repository->logged_at;

Return the last time the Ohloh server successfully queried the repository.

commits

    my $nbr = $repository->commits;

Return the total number of commits downloaded by the Ohloh server.

ohloh_job_status

    my $ok = $repository->ohloh_job_status eq 'success';

Return the result of the last attempt of the Ohloh server to read the repository, which can be either success or failed.

Other Methods

as_xml

Return the account information as an XML string. Note that this is not the exact xml document as returned by the Ohloh server.

SEE ALSO ^

VERSION ^

This document describes WWW::Ohloh::API::ContributorLanguageFact version 0.0.6

BUGS AND LIMITATIONS ^

WWW::Ohloh::API is very extremely alpha quality. It'll improve, but till then: Caveat emptor.

The as_xml() method returns a re-encoding of the account data, which can differ of the original xml document sent by the Ohloh server.

Please report any bugs or feature requests to bug-www-ohloh-api@rt.cpan.org, or through the web interface at http://rt.cpan.org.

AUTHOR ^

Yanick Champoux <yanick@cpan.org>

LICENCE AND COPYRIGHT ^

Copyright (c) 2008, Yanick Champoux <yanick@cpan.org>. All rights reserved.

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic.

syntax highlighting: