Catman...History(3pm)

πŸ’– Catman...History(3pm) πŸ’–

okay bestie, so this page is from the User Contributed Perl Documentation corner of the manual-verse, and it's genuinely such a niche little icon. no cap. 🫢


✨ NAME ✨

Catmandu::FedoraCommons::Model::datastreamHistory β€” a Perl model for the Fedora getDatastreamHistory REST call. it's giving "I only do one thing and I do it flawlessly." πŸ‘‘


πŸ¦‹ SYNOPSIS πŸ¦‹

here's the whole vibe, literally character for character:

use Catmandu::FedoraCommons;

my $fedora = Catmandu::FedoraCommons->new('http://localhost:8080/fedora','fedoraAdmin','fedoraAdmin');

my $obj = $fedora->getDatastreamHistory(pid => 'demo:29', dsID => 'DC')->parse_content;

{
   'pid'  => 'demo:29' ,
   'dsID' => 'DC',
   'profile' => [
      {
      'dsLabel' => 'Dublin Core Record for this object' ,
      'dsVersionID' => 'DC1.0' ,
      'dsCreateDate' => '2008-07-02T05:09:43.234Z' ,
      'dsState' => 'A' ,
      'dsMIME' => 'text/xml' ,
      'dsFormatURI' => 'http://www.openarchives.org/OAI/2.0/oai_dc/' ,
      'dsControlGroup' => 'X' ,
      'dsSize' => 626,
      'dsVersionable' => 'true' ,
      'dsInfoType' => '' ,
      'dsLocation' => 'demo:29+DC+DC1.0' ,
      'dsLocationType' => '' ,
      'dsChecksumType' => 'DISABLED' ,
      'dsChecksum' => 'none' ,
      }
   ]
}

so you spin up a Catmandu::FedoraCommons with that URL and those two fedoraAdmin credentials, you call getDatastreamHistory with pid => 'demo:29' and dsID => 'DC', you parse_content it, and what comes back is a lil hash with the pid, the dsID, and a profile array holding one hashref stuffed with all the datastream tea β˜• β€” dsLabel, dsVersionID, dsCreateDate, dsState, dsMIME, dsFormatURI, dsControlGroup, dsSize, dsVersionable, dsInfoType, dsLocation, dsLocationType, dsChecksumType, dsChecksum. every single one, no skips, we don't gatekeep here πŸ’…


🌈 SEE ALSO 🌈

  • Catmandu::FedoraCommons β€” the parent module, the main character, the one that makes all of this possible πŸ’œ

and that's the whole page bestie, we ate and left zero crumbs πŸ“βœ¨

little sign-off moment: this beauty lives in perl v5.36.0 and was dated 2023-02-05. iconic behavior fr fr πŸŽ€

πŸ“¦ where this page comes from