Catman...Methods(3pm)

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

okay bestie, welcome to the Catman...Methods(3pm) page β€” yes that's the header, yes the manual name is folded in there, we're keeping it cute and we're keeping it accurate. this is a Perl model page, so grab a boba and let's go πŸ§‹βœ¨


🌸 NAME 🌸

Catmandu::FedoraCommons::Model::listMethods β€” it's the Perl model for the Fedora listMethods REST call. that's the whole vibe. it's giving "small module, big responsibilities" πŸ’…


✨ SYNOPSIS ✨

so here's how you actually use it, no cap:

use Catmandu::FedoraCommons;

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

my $obj = $fedora->listMethods(pid => 'demo:29')->parse_content;

{
  'pid'     => 'demo:29' ,
  'baseURL' => 'http://localhost:8080/fedora/' ,
  'sDef' => [
      {
          'pid' => 'demo:27',
          'method' => [
              {
                  'name' => 'resizeImage' ,
                  'methodParm' => [
                       {
                      'parmDefaultValue' => '150',
                      'parmLabel' => 'fix me',
                      'parmRequired' => 'true',
                      'parmName' => 'width'
                       }
                  ],
              },
           ]
      }
  ]
}

like… you build the Catmandu::FedoraCommons object, you hit listMethods with pid => 'demo:29', you call ->parse_content on it, and what comes back is that whole nested hashref situation. look at it. sDef is an array, each one has a pid and a method array, each method has a name and a methodParm array, and each parm carries parmDefaultValue, parmLabel, parmRequired and parmName. the parmLabel literally says 'fix me' and honestly? iconic. we've all been there πŸ™ˆ

the way that 'parmRequired' => 'true' is a string and not a boolean is a whole personality trait and we're not judging 🫢


πŸ¦‹ SEE ALSO πŸ¦‹

  • Catmandu::FedoraCommons β€” go here next, it's the parent situation, the main character πŸ‘‘

heads up bestie: this page has no OPTIONS, no DESCRIPTION, no exit statuses, no env vars, no bugs section. what you see is what you get. don't go looking for lore that isn't there πŸ’€

that's the whole page, fr fr 🌈 and for the cute sign-off: this came from perl v5.36.0, dated 2023-02-05, and it's the Catman...Methods(3pm) footer energy β€” User Contributed Perl Documentation, as always. mwah πŸ’‹βœ¨

πŸ“¦ where this page comes from