logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

Catmandu::Importer::Atom - Package that imports Atom feeds

Data Model

       Each parsed Atom entry is transformed into a hash ref:

           {
               id         => '...' ,
               title      => '...' ,
               published  => '...' ,
               updated    => '...' ,
               summary    => '...' ,
               rights     => '...' ,
               content    => {
                   mode => '...' ,
                   type => '...' ,
                   body => '...' ,
               } ,
               author     => {
                   name  => '...' ,
                   email => '...' ,
                   uri   => '...' ,
                   homepage => '...' ,
               } ,
               contributor => {
                   name  => '...' ,
                   email => '...' ,
                   uri   => '...' ,
                   homepage => '...' ,
               } ,
               category => [
                   { term => '...' , label => '...' , scheme => '....' } ,
               ],
               link => [
                   { rel => '...' , href => '...' , hreflang => '...' ,
                     title => '...' , type => '...' , length => '...'} ,
               ],
               <<all other elements are added as name-value pairs>>
           }

Methods

new(url=>URL,[entries=>[qw(...)])
       Create a new Atom importer for the URL. Optionally provide a entries parameter with the feed items you
       want to import.

   counteach(&callback)...
       Every Catmandu::Importer is a Catmandu::Iterable all its methods are inherited. The
       Catmandu::Importer::Atom methods are not idempotent: Atom feeds can only be read once.

Name

       Catmandu::Importer::Atom - Package that imports Atom feeds

See Also

       Catmandu::Iterable

perl v5.36.0                                       2022-12-10                      Catmandu::Importer::Atom(3pm)

Synopsis

           use Catmandu::Importer::Atom;

           my $importer = Catmandu::Importer::Atom->new(url => "...");

           my $n = $importer->each(sub {
               my $hashref = $_[0];
               # ...
           });

See Also