Merge branch 'atom-post' into 'nightly'

Add support for Atom entry when posting status

See merge request !135
This commit is contained in:
mmn 2017-04-06 09:20:38 +00:00
commit bd24724560
2 changed files with 4 additions and 2 deletions

View File

@ -46,7 +46,7 @@
/api/statuses/update.:format /api/statuses/update.:format
@par Formats (:format) @par Formats (:format)
xml, json xml, json, atom
@par HTTP Method(s) @par HTTP Method(s)
POST POST
@ -339,6 +339,8 @@ class ApiStatusesUpdateAction extends ApiAuthAction
$this->showSingleXmlStatus($this->notice); $this->showSingleXmlStatus($this->notice);
} elseif ($this->format == 'json') { } elseif ($this->format == 'json') {
$this->show_single_json_status($this->notice); $this->show_single_json_status($this->notice);
} elseif ($this->format == 'atom') {
$this->showSingleAtomStatus($this->notice);
} }
} }
} }

View File

@ -420,7 +420,7 @@ class Router
$m->connect('api/statuses/update.:format', $m->connect('api/statuses/update.:format',
array('action' => 'ApiStatusesUpdate', array('action' => 'ApiStatusesUpdate',
'format' => '(xml|json)')); 'format' => '(xml|json|atom)'));
$m->connect('api/statuses/destroy/:id.:format', $m->connect('api/statuses/destroy/:id.:format',
array('action' => 'ApiStatusesDestroy', array('action' => 'ApiStatusesDestroy',