git.gnu.io has moved to IP address 209.51.188.249 -- please double check where you are logging in.

Commit 8b8e0c95 authored by Zach Copley's avatar Zach Copley

Add route for /statuses/show

parent a3901e0e
......@@ -83,7 +83,7 @@ class ApiShowAction extends TwitterapiAction
/**
* Handle the request
*
* Just show the notices
* Check the format and show the notice
*
* @param array $args $_REQUEST data (unused)
*
......@@ -103,7 +103,7 @@ class ApiShowAction extends TwitterapiAction
}
/**
* Show the timeline of notices
* Show the notice
*
* @return void
*/
......@@ -125,14 +125,14 @@ class ApiShowAction extends TwitterapiAction
if (!empty($deleted)) {
$this->clientError(
_('Status deleted.'),
410,
_('Status deleted.'),
410,
$this->format
);
} else {
$this->clientError(
_('No status with that ID found.'),
404,
404,
$this->format
);
}
......
......@@ -332,10 +332,19 @@ class Router
'id' => '[a-zA-Z0-9]+',
'format' => '(xml|json)'));
$m->connect('api/statuses/show.:format',
array('action' => 'ApiShow',
'format' => '(xml|json)'));
$m->connect('api/statuses/show/:id.:format',
array('action' => 'ApiShow',
'id' => '[a-zA-Z0-9]+',
'format' => '(xml|json)'));
$m->connect('api/statuses/:method',
array('action' => 'api',
'apiaction' => 'statuses'),
array('method' => '(update|show|featured)(\.(atom|rss|xml|json))?'));
array('method' => '(update|featured)(\.(atom|rss|xml|json))?'));
$m->connect('api/statuses/:method/:argument',
array('action' => 'api',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment