Benjamin Trott

NAME

XML::Atom::API - A client for the Atom API

SYNOPSIS

    use XML::Atom::API;
    use XML::Atom::Entry;
    my $api = XML::Atom::API->new;
    $api->introspect('http://www.my-weblog.com/atom');
    $api->username('Melody');
    $api->password('Nelson');

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

DESCRIPTION

XML::Atom::API implements a client for the Atom API described at http://bitworking.org/rfc/draft-gregorio-07.html, with the authentication scheme described at http://bitworking.org/news/New_AtomAPI_Implementation_Release2.

USAGE

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

$api->username([ $username ])

$api->password([ $password ])

$api->introspect($url)

$api->createEntry($entry)

Creates a new entry.

$entry must be an XML::Atom::Entry object.

$api->getEntry($url)

Retrieves the entry with the given URL $url.

Returns an XML::Atom::Entry object.

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

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

Returns true on success, false otherwise.

$api->deleteEntry($url)

Deletes the entry at URL $url.

$api->searchEntries

Retrieves a list of entries.

Returns a reference to an array of hash references, each with two keys: id, the URL for editing/retrieving the entry; and title, the title of the entry.

ERROR HANDLING

Methods return undef on error, and the error message can be retrieved using the errstr method.

AUTHOR & COPYRIGHT

Please see the XML::Atom manpage for author, copyright, and license information.