STRACT: Perl API Bindings to the OSI License API
use Moo;
use REST::Client;
use Const::Fast;
use JSON;
use Carp;
const my $base_url => 'https://api.opensource.org';
has _api_client => ( is => 'lazy
();
my $response = shift();
if ( $response->responseCode() == 200 ) {
return from_json( $response->responseContent );
} else {
croak 'Error: ' . $response->responseCode() .
THODS
=head2 all
Get a list of all known licenses.
The response is the perl equivalent of the json returned by the api,
documented in L<https://github.com/OpenSourceOrg/api/blob/master/doc/endpoin