NAME

WWW::Ohloh::API - Ohloh API implementation (DEPRECATED)

VERSION

version 1.0.2

SYNOPSIS

use WWW::Ohloh::API;

my $ohloh = WWW::Ohloh::API->new( api_key => $my_api_key );
my $account = $ohloh->fetch_account( 12933 );

print $account->name;

DESCRIPTION

Deprecated: Ohloh itself is long gone. So it goes.

This module is a Perl interface to the Ohloh API as defined at http://www.ohloh.net/api/getting_started.

NAME

WWW::Ohloh::API - Ohloh API implementation

METHODS

new( [ api_key => $api_key ] )

Create a new WWW::Ohloh::API object. To be able to retrieve information from the Ohloh server, an api key must be either passed to the constructor or set via the set_api_key method.

my $ohloh = WWW::Ohloh::API->new( api_key => $your_key );

fetch_account( $account_id )

Return the account associated with the $account_id as a WWW::Ohloh::API::Account object. If no such account exists, an error is thrown. The $accound_id can either be specified as the Ohloh id number, or the email address associated with the account.

my $account = $ohloh->fetch_account( 12933 );
my $other_accound = $ohloh->fetch_account( 'foo@bar.com' );

fetch_project( $id )

Return the project having the Ohloh id $id as a WWW::Ohloh::API::Project. If no such project exists, an error is thrown.

my $project = $ohloh->fetch_project( 1234) ;
print $project->name;

fetch_projects( query => $query, sort => $sorting_order, max => $nbr )

Return a set of projects as a WWW::Ohloh::API::Projects object.

Parameters

fetch_languages( sort => $order )

Return the languages known to Ohloh a set of WWW::Ohloh::API::Language objects.

An optional sort parameter can be passed to the method. The valid _$order_s it accepts are total, code, projects, comment_ratio, contributors, commits and name. If sort is not explicitly called, projects are returned in alphabetical order of names.

fetch_activity_facts( $project_id, $analysis )

Return a set of activity facts computed out of the project associated with the $project_id as a WWW::Ohloh::API::ActivityFacts object.

The optional argument $analysis can be either an Ohloh analysis id (which must be an analysis associated to the project) or the keyword 'latest'. By default the latest analysis will be queried.

fetch_contributor_language_facts( project_id => $p_id, contributor_id => $c_id )

my @facts = $ohloh->fetch_contributor_language_facts(
    project_id     => 1234,
    contributor_id => 5678
);

Return the list of contributor language facts associated to the contributor $c_id for the project $p_id.

fetch_enlistments( project_id => $id )

Returns the list of enlistements pertaining to the given project as an WWW::Ohloh::API::Enlistment object.

my $enlistments = $ohloh->fetch_enlistments( project_id => 1234 );

while ( my $enlistment = $enlistments->next ) {
    # do stuff with $enlistment...
}

fetch_size_facts( $project_id, $analysis_id )

Return the list of WWW::Ohloh::API::SizeFact objects pertaining to the given project and analysis. If $analysis_id is not provided, it defaults to the latest analysis done on the project.

fetch_project_stacks( $project_id )

Returns the list of stacks containing the project as WWW::Ohloh::API::Stack objects.

fetch_account_stack( $account_id )

Returns the stack associated with the account as an WWW::Ohloh::API::Stack object.

fetch_kudos( $account_id )

Returns the kudos associated with the given account (the id can be either the numerical id or the account's email address) as a list of WWW::Ohloh::API::Kudo objects.

my @kudos = $ohloh->fetch_kudos( 12345 );

fetch_messages( [ account | project ] => $id )

Returns the messages associated to the given account or project as a WWW::Ohloh::API::Messages object.

SEE ALSO

VERSION

This document describes WWW::Ohloh::API version 1.0_1

BUGS AND LIMITATIONS

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

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> endorse

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.

AUTHOR

Yanick Champoux yanick@cpan.org endorse

COPYRIGHT AND LICENSE

This software is copyright (c) 2025, 2008 by Yanick Champoux.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.