WWW::RT::CPAN - Scrape information from https://rt.cpan.org
This document describes version 0.002 of WWW::RT::CPAN (from Perl distribution WWW-RT-CPAN), released on 2017-02-03.
use WWW::RT::CPAN qw( list_dist_active_tickets list_dist_resolved_tickets list_dist_rejected_tickets ); my $res = list_dist_active_tickets(dist => 'Acme-MetaSyntactic');
Sample result:
[ 200, "OK", [ { broken_in => [], # e.g. ["0.40", "0.41"] fixed_in => [], id => 120076, last_updated_raw => "8 hours ago", severity => "Wishlist", status => "new", title => "Option to return items in order?", }, { broken_in => [], fixed_in => [], id => 118805, last_updated_raw => "3 months ago", severity => "Wishlist", status => "new", title => "Print list of categories of a theme?", }, ], ]
Another example (dist not found):
my $res = list_dist_active_tickets(dist => 'Foo-Bar');
Example result:
[400, "No such distribution"]
This module provides some functions to retrieve data from https://rt.cpan.org by scraping the web pages. Compared to RT::Client::REST, it provides less functionality but it can get public information without having to log in first.
Usage:
list_dist_active_tickets(%args) -> [status, msg, result, meta]
List active tickets for a distribution.
This function is not exported by default, but exportable.
Arguments ('*' denotes required arguments):
dist* => perl::distname
Returns an enveloped result (an array).
First element (status) is an integer containing HTTP status code (200 means OK, 4xx caller error, 5xx function error). Second element (msg) is a string containing error message, or 'OK' if status is 200. Third element (result) is optional, the actual result. Fourth element (meta) is called result metadata and is optional, a hash that contains extra information.
Return value: (any)
list_dist_rejected_tickets(%args) -> [status, msg, result, meta]
List rejected tickets for a distribution.
list_dist_resolved_tickets(%args) -> [status, msg, result, meta]
List resolved tickets for a distribution.
Please visit the project's homepage at https://metacpan.org/release/WWW-RT-CPAN.
Source repository is at https://github.com/perlancar/perl-WWW-RT-CPAN.
Please report any bugs or feature requests on the bugtracker website https://rt.cpan.org/Public/Dist/Display.html?Name=WWW-RT-CPAN
When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.
RT::Client::REST
perlancar <perlancar@cpan.org>
This software is copyright (c) 2017 by perlancar@cpan.org.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install WWW::RT::CPAN, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WWW::RT::CPAN
CPAN shell
perl -MCPAN -e shell install WWW::RT::CPAN
For more information on module installation, please visit the detailed CPAN module installation guide.