The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

WWW::Ohloh::API::Project - an Ohloh project

SYNOPSIS

    use WWW::Ohloh::API;

    my $ohloh = WWW::Ohloh::API->new( api_key => $my_api_key );
    my $project = $ohloh->get_project( id => 1001 );

    print $project->homepage_url;

DESCRIPTION

W::O::A::Project contains the information associated with an Ohloh project as defined at http://www.ohloh.net/api/reference/project. To be properly populated, it must be created via the get_project method of a WWW::Ohloh::API object.

METHODS

API Data Accessors

id

Return the project's id.

name

Return the name of the project.

created_at

Return the time at which the project was initially added to Ohloh.

updated_at

Return the time of the most recent modification of the project's record.

description

Return a description of the project.

homepage_url

Return the URL of the project's homepage.

download_url

Return an url to a project download.

irc_url

Return a URL to an IRC channel associated to the project.

stack_count

Return the number of stacks currently using the project.

average_rating

Return a number ranging from 1.0 to 5.0, representing the average value of all user ratings for this project, where 1 is the worst possible rating, and 5 the best.

rating_count

Return the number of users having rated this project.

analysis_id

Return the id of the current analysis associated with the project. It'll be the latest analysis if the project has been retrieved via get_project, and will be null if retrieved via get_projects.

analysis( $id )

Return the Ohloh analysis $id (which can also be the keyword 'latest') as an WWW::Ohloh::API::Analysis object. If $id is omitted, return the previously requested analysis for this project or, if none has been requested yet, the latest analysis available for the project.

activity_facts( $analysis_id )

Return activity facts related to the project as a WWW::Ohloh::API::ActivityFacts object. The activity facts are taken from the analysis specified by $analysis_id. If $analysis_id is not given, the previously called analysis will be used and, if no analysis has been explicitly called, the latest one will be used.

    $project = $ohloh->get_project( 12345);       # retrieve the project

    $latest = $project->activity_facts;           # get the latest facts

    $specific = $project->activity_facts( 789 );  # get facts from analysis 789

    $project->analysis( 789 );  
    $specific = $project->activity_facts;      # equivalent to previous example

factoids

    @factoids = $project->factoids;

Return the factoids associated with the project as WWW::Ohloh::API::Factoid objects.

Other Methods

as_xml

Return the account information (including the kudo score if it applies) as an XML string. Note that this is not the exact xml document as returned by the Ohloh server.

Factoids will be included in the xml output if they have been queried prior to the call to as_xml.

SEE ALSO

VERSION

This document describes WWW::Ohloh::API version 0.0.8

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.