<<

NAME

MT::AtomServer

SYNOPSIS

An Atom Publishing API interface for communicating with Movable Type.

METHODS

$app->xml_body()

Takes the content posted to the server and parses it into an XML document. Uses either XML::LibXML or XML::XPath depending on which is available.

$app->iso2epoch($iso_ts)

Converts $iso_ts in the format of an ISO timestamp into a unix timestamp (seconds since the epoch).

$app->init

Initializes the application.

$app->get_auth_info

Processes the request for WSSE authentication and returns a hash containing:

  • Username
  • PasswordDigest
  • Nonce
  • Created

$app->handle_request

The implementation of this in MT::AtomServer::Weblog passes the request to the proper method.

$app->handle

Wrapper method that determines the proper AtomServer package to pass the request to.

$app->iso2ts($iso_ts, $target_zone)

Converts $iso_ts in the format of an ISO timestamp into a MT-compatible timestamp (YYYYMMDDHHMMSS) for the specified timezone $target_zone.

$app->atom_body

Processes the request as Atom content and returns an XML::Atom object.

$app->error($code, $message)

Sends the HTTP headers necessary to relay an error.

$app->authenticate()

Checks the WSSE authentication with the local MT user database and confirms the user is authorized to access the resources required by the request.

$app->show_error($message)

Returns an XML wrapper for the error response.

$app->auth_failure($code, $message)

Handles the response in the event of an authentication failure.

CALLBACKS

api_pre_save.entry
    callback($eh, $app, $entry, $original_entry)

Called before saving a new or existing entry. If saving a new entry, the $original_entry will have an unassigned 'id'. This callback is executed as a filter, so your handler must return 1 to allow the entry to be saved.

api_post_save.entry
    callback($eh, $app, $entry, $original_entry)

Called after saving a new or existing entry. If saving a new entry, the $original_entry will have an unassigned 'id'.

<<