API-ReviewBoard
view release on metacpan or search on metacpan
ReviewBoard.pm view on Meta::CPAN
#Imports ReviewBoard Class.
use API::ReviewBoard;
#Init's the ReviewBoard Class.
my $rb = ReviewBoard->new( hostedurl => 'http://hostedurl.reviewboard.com',
username => 'user',
password => 'password' );
print "*****************************************************\n";
print " UnitTest to exercise ReviewBoard Class API's \n";
print " Author: chetang\@cpan.org \n";
print "*****************************************************\n\n";
my $submitter = $rb->getSubmitter(changenum => '13638134');
print "Review Submitted by:\n", @$submitter, "\n\n";
my $reviewlink = $rb->getReviewBoardLink(changenum => '13027232');
print "Review Board Link:\n",$reviewlink,"\n\n";
my $description = $rb->getReviewDescription(changenum => '13027232');
print "Review Request description:\n",$description,"\n\n";
my $date_added = $rb->getReviewDateAdded(changenum => '13027322');
print "Review Request Added Date:\n", $date_added, "\n\n";
my $last_updated = $rb->getReviewLastUpdated(changenum => '13027232');
print "Review Request Last Updated Date:\n", $last_updated, "\n\n";
my $reviewers = $rb->getReviewers(changenum => '1302722');
print "Reviewers assigned to Review Request:\n @$reviewers \n\n";
my $summary = $rb->getSummary(changenum => '1302722');
print "Summary of Review Request:\n", $summary, "\n\n";
my $bug = $rb->getBugIds(changenum => '1302722');
print "Associated Bug list:\n", $bug, "\n\n";
my $commentscount = $rb->getReviewCommentsCount( reviewnum => '4108034');
print "No of comments added for Review Request:\n", $commentscount, "\n\n";
my $outgoingreviews = $rb->getOutgoingReviewsCount(user => 'users');
print "No of outgoing Review Requests by user 'users':\n",$outgoingreviews,"\n\n";
my $reviewsbydate = $rb->getOutgoingReviewsCountByDate(user => 'users', startdate => '2011-03-01', enddate => '2011-03-30');
print "No of outgoing Review Requests by user 'users' during time interval:\n", $reviewsbydate, "\n\n";
my $reviewsbystatus = $rb->getOutgoingReviewsCountByStatus(user => 'users', status => 'submitted');
print "No of outgoing Review Requests by user 'users' in state submitted:\n", $reviewsbystatus, "\n\n";
my $incomingreviews = $rb->getIncomingReviewsCount(user => 'users');
print "No of incoming review requests made to user:\n", $incomingreviews, "\n\n";
=head1 DESCRIPTION
C<API::ReviewBoard> provides an interface to work with the exported ReviewBoard 2.0 APIs.
You can choose to either subclass this module, and thus using its
accessors on your own module, or to store an C<API::ReviewBoard>
object inside your own object, and access the accessors from there.
See the C<SYNOPSIS> for examples.
( run in 1.305 second using v1.01-cache-2.11-cpan-de7293f3b23 )