Net::PMP::CollectionDoc - Collection.doc+JSON object for Net::PMP::Client
my $doc = $pmp_client->get_doc(); printf("API version: %s\n", $doc->version); my $query_links = $doc->get_links('query');
Net::PMP::CollectionDoc represents the PMP API media type https://github.com/publicmediaplatform/pmpdocs/wiki/Collection.doc-JSON-Media-Type.
The unique identifier. See http://cdoc.io/spec.html#guid-vs-href.
Returns arrayref of child items. These are returned as a convenience from the server and are not a native part of the CollectionDoc.
Returns Net::PMP::CollectionDoc::Links object for type, which may be one of (for example):
Returns hashref of link data.
Returns hashref of attribute data.
Returns API version string.
Returns Net::PMP::CollectionDoc::Items object, unlike the items accessor method, which returns the raw arrayref.
Returns total number of items this CollectionDoc refers to. NOTE this is not the current result set, but the server-side total. I.e., paging is ignored.
Returns Net::PMP::CollectionDoc::Link object matching urn, or undef if no match is found.
Returns title attribute value.
title
Returns first profile link href value.
profile
href
Returns the href string from the navigation link representing this CollectionDoc.
navigation
Returns the href string from the edit link representing this CollectionDoc.
edit
edit_link may be passed explicitly, which is usually necessary for saving a doc the first time.
Returns canonical URI for Doc per 'self' link.
Sets the href string for the navigation link representing this CollectionDoc.
Returns the guid attribute.
guid
Returns a v4-compliant UUID per PMP spec.
NOTE the use_remote flag is currently ignored.
Sets the guid attribute to guid. If guid is omitted, the return value of create_guid() is used.
Returns the CollectionDoc as a hashref. as_json() calls this method internally.
Returns minimal hashref describing CollectionDoc, suitable for links item attribute. This method is called internally by as_hash(); it automatically recurses for any descendent items.
Returns the CollectionDoc as a JSON-encoded string suitable for saving.
Shortcut for:
push @{ $doc->links->{item} }, $child->as_link_hash;
Peter Karman, <karman at cpan.org>
<karman at cpan.org>
Please report any bugs or feature requests to bug-net-pmp at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Net-PMP. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-net-pmp at rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc Net::PMP::CollectionDoc
You can also look for information at:
RT: CPAN's request tracker (report bugs here)
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Net-PMP
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/Net-PMP
CPAN Ratings
http://cpanratings.perl.org/d/Net-PMP
Search CPAN
http://search.cpan.org/dist/Net-PMP/
American Public Media and the Public Media Platform sponsored the development of this module.
Copyright 2013 American Public Media Group
See the LICENSE file that accompanies this module.
To install Net::PMP, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::PMP
CPAN shell
perl -MCPAN -e shell install Net::PMP
For more information on module installation, please visit the detailed CPAN module installation guide.