Net-PMP

 view release on metacpan or  search on metacpan

lib/Net/PMP/CollectionDoc.pm  view on Meta::CPAN

# the 'required' flag on these attributes should match
# the core CollectionDoc schema:
# https://api.pmp.io/schemas/core

has 'href' => (
    is       => 'rw',
    isa      => 'Net::PMP::Type::Href',
    required => 0,
    coerce   => 1,
);
has 'links'      => ( is => 'ro', isa => 'HashRef', required => 0, );
has 'attributes' => ( is => 'ro', isa => 'HashRef', required => 0, );
has 'version' =>
    ( is => 'ro', isa => 'Str', required => 1, default => sub {'1.0'}, );
has 'items' => ( is => 'ro', isa => 'ArrayRef', required => 0, );

=head1 NAME

Net::PMP::CollectionDoc - Collection.doc+JSON object for Net::PMP::Client

=head1 SYNOPSIS

 my $doc = $pmp_client->get_doc();
 printf("API version: %s\n", $doc->version);
 my $query_links = $doc->get_links('query');

lib/Net/PMP/Schema.pm  view on Meta::CPAN

package Net::PMP::Schema;
use Moose;
use Carp;
use Data::Dump qw( dump );

our $VERSION = '0.006';

has 'definitions' => ( is => 'ro', isa => 'HashRef', required => 1, );
has 'description' => ( is => 'ro', isa => 'Str',     required => 1, );
has 'id'          => ( is => 'ro', isa => 'Str',     required => 1, );
has 'properties'  => ( is => 'ro', isa => 'HashRef', required => 1, );
has 'type'        => ( is => 'ro', isa => 'Str',     required => 1, );

=head1 NAME

Net::PMP::Schema - PMP schema object

=head1 SYNOPSIS

 my $schema = $pmp_client->get_doc($pmp_client->host . '/schemas/user');



( run in 0.730 second using v1.01-cache-2.11-cpan-5f2e87ce722 )