XML::A...:Client(3pm)

πŸ’– NAME πŸ’–

Okay bestie, welcome to the XML::A...:Client(3pm) page from the User Contributed Perl Documentation β€” it’s all about XML::Atom::Client, which is a client for the Atom API. Periodt. πŸ’…


✨ SYNOPSIS ✨

use XML::Atom::Client;
use XML::Atom::Entry;
my $api = XML::Atom::Client->new;
$api->username('Melody');
$api->password('Nelson');

my $entry = XML::Atom::Entry->new;
$entry->title('New Post');
$entry->content('Content of my post.');
my $EditURI = $api->createEntry($PostURI, $entry);

my $feed = $api->getFeed($FeedURI);
my @entries = $feed->entries;

my $entry = $api->getEntry($EditURI);

🌸 DESCRIPTION 🌸

XML::Atom::Client implements a client for the Atom API described at http://bitworking.org/projects/atom/draft-gregorio-09.html, with the authentication scheme described at http://www.intertwingly.net/wiki/pie/DifferentlyAbledClients. πŸ¦‹

⚠️ NOTE: the API, and particularly the authentication scheme, are still in flux. No cap β€” it’s giving β€œwork in progress,” bestie.

πŸŽ€ USAGE πŸŽ€

XML::Atom::Client->new(%param)

Here’s the new method heading, with %param exactly like the page says. ✨

$api->use_soap([ 0 | 1 ])

XML::Atom::Client supports both the REST and SOAP-wrapper versions of the Atom API. By default, the REST version of the API will be used, but you can turn on the SOAP wrapper β€” for example, if you need to connect to a server that supports only the SOAP wrapper β€” by calling use_soap with a value of 1: πŸ’–

$api->use_soap(1);

If called without arguments, returns the current value of the flag. 🫢

$api->username([ $username ])

If called with an argument, sets the username for login to $username.

Returns the current username that will be used when logging in to the Atom server. πŸ‘‘

$api->password([ $password ])

If called with an argument, sets the password for login to $password.

Returns the current password that will be used when logging in to the Atom server. πŸ”

$api->createEntry($PostURI, $entry)

Creates a new entry. ✨

$entry must be an XML::Atom::Entry object. No substitutions, bestie.

$api->getEntry($EditURI)

Retrieves the entry with the given URL $EditURI.

Returns an XML::Atom::Entry object. πŸŽ€

$api->updateEntry($EditURI, $entry)

Updates the entry at URL $EditURI with the entry $entry, which must be an XML::Atom::Entry object.

Returns true on success, false otherwise. πŸ’―

$api->deleteEntry($EditURI)

Deletes the entry at URL $EditURI. Poof. πŸ’¨

$api->getFeed($FeedURI)

Retrieves the feed at $FeedURI.

Returns an XML::Atom::Feed object representing the feed returned from the server. 🌈


πŸ’… ERROR HANDLING πŸ’…

Methods return undef on error, and the error message can be retrieved using the errstr method. So if things go sideways, errstr is your bestie. 😭🫢


Please see the XML::Atom manpage for author, copyright, and license information. πŸ“œ


That’s the whole vibe πŸ’« β€” XML::A...:Client(3pm), perl v5.42.2, dated 2026-02-15. Bye bestie πŸ«ΆπŸ’…

πŸ“¦ where this page comes from