diff options
author | Evan Prodromou <evan@status.net> | 2010-04-22 08:49:33 -0700 |
---|---|---|
committer | Evan Prodromou <evan@status.net> | 2010-04-22 08:49:33 -0700 |
commit | beaecb18d5b92b913473dfffd545dc436f50cf66 (patch) | |
tree | 2432377ec97361e8e2401dbe3eba04cef91cf6e7 /actions/apidirectmessage.php | |
parent | fd9d520aeb52f7f3a3fe7c242fbe16078de1bc6e (diff) |
Add statusnet: prefix for API to JSON and XML output
I added the statusnet: prefix to the xml output. This prefix should
be declared on the root element of all relevant XML output.
I also added two StatusNet-specific fields:
* statusnet:html - rendered HTML. Clients shouldn't have to guess
at the correct HTML rendering for notices, especially since some
of the links depend on context.
* statusnet:profile_url - profile URL for a user. You can't count
on a user being a local user in a distributed microblogging world.
So, this shows the explicit profile_url.
Diffstat (limited to 'actions/apidirectmessage.php')
-rw-r--r-- | actions/apidirectmessage.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/actions/apidirectmessage.php b/actions/apidirectmessage.php index 53da9e0c6..7a0f46274 100644 --- a/actions/apidirectmessage.php +++ b/actions/apidirectmessage.php @@ -232,7 +232,8 @@ class ApiDirectMessageAction extends ApiAuthAction function showXmlDirectMessages() { $this->initDocument('xml'); - $this->elementStart('direct-messages', array('type' => 'array')); + $this->elementStart('direct-messages', array('type' => 'array', + 'xmlns:statusnet' => 'http://status.net/schema/api/1/')); foreach ($this->messages as $m) { $dm_array = $this->directMessageArray($m); |