forked from GNUsocial/gnu-social
Add route for /statuses/show
This commit is contained in:
parent
a3901e0e24
commit
8b8e0c95af
@ -83,7 +83,7 @@ class ApiShowAction extends TwitterapiAction
|
|||||||
/**
|
/**
|
||||||
* Handle the request
|
* Handle the request
|
||||||
*
|
*
|
||||||
* Just show the notices
|
* Check the format and show the notice
|
||||||
*
|
*
|
||||||
* @param array $args $_REQUEST data (unused)
|
* @param array $args $_REQUEST data (unused)
|
||||||
*
|
*
|
||||||
@ -103,7 +103,7 @@ class ApiShowAction extends TwitterapiAction
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Show the timeline of notices
|
* Show the notice
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
@ -125,14 +125,14 @@ class ApiShowAction extends TwitterapiAction
|
|||||||
|
|
||||||
if (!empty($deleted)) {
|
if (!empty($deleted)) {
|
||||||
$this->clientError(
|
$this->clientError(
|
||||||
_('Status deleted.'),
|
_('Status deleted.'),
|
||||||
410,
|
410,
|
||||||
$this->format
|
$this->format
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
$this->clientError(
|
$this->clientError(
|
||||||
_('No status with that ID found.'),
|
_('No status with that ID found.'),
|
||||||
404,
|
404,
|
||||||
$this->format
|
$this->format
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -332,10 +332,19 @@ class Router
|
|||||||
'id' => '[a-zA-Z0-9]+',
|
'id' => '[a-zA-Z0-9]+',
|
||||||
'format' => '(xml|json)'));
|
'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',
|
$m->connect('api/statuses/:method',
|
||||||
array('action' => 'api',
|
array('action' => 'api',
|
||||||
'apiaction' => 'statuses'),
|
'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',
|
$m->connect('api/statuses/:method/:argument',
|
||||||
array('action' => 'api',
|
array('action' => 'api',
|
||||||
|
Loading…
Reference in New Issue
Block a user