summaryrefslogtreecommitdiff
path: root/actions/twitapistatuses.php
diff options
context:
space:
mode:
authorzach <zach@controlyourself.ca>2008-08-18 20:39:31 -0400
committerzach <zach@controlyourself.ca>2008-08-18 20:39:31 -0400
commite440b9cea02549032ba4f79c43964219dea23d82 (patch)
tree12cc59597f03aa83d1e0b3c99af701a0c7be3585 /actions/twitapistatuses.php
parentd57bc1b8e99a432d7f6425d0c8836a3c4928581a (diff)
Twitter-compatible API - moved show() to the right file
darcs-hash:20080819003931-462f3-4b5b838a2fc5f872391581a189d33abdd8eeb744.gz
Diffstat (limited to 'actions/twitapistatuses.php')
-rw-r--r--actions/twitapistatuses.php21
1 files changed, 21 insertions, 0 deletions
diff --git a/actions/twitapistatuses.php b/actions/twitapistatuses.php
index 6a63dd037..66d3737fd 100644
--- a/actions/twitapistatuses.php
+++ b/actions/twitapistatuses.php
@@ -530,6 +530,27 @@ class TwitapistatusesAction extends TwitterapiAction {
}
+ function show($args, $apidata) {
+ parent::handle($args);
+
+ $notice_id = $apidata['api_arg'];
+ $notice = Notice::staticGet($notice_id);
+
+ if ($notice) {
+ if ($apidata['content-type'] == 'xml') {
+ $this->show_single_xml_status($notice);
+ } elseif ($apidata['content-type'] == 'json') {
+ $this->show_single_json_status($notice);
+ }
+ } else {
+
+ // XXX: This is all that Twitter does. It doesn't show an XML or JSON error msg.
+ // Should we call client_error() to be more consistent?
+ header('HTTP/1.1 404 Not Found');
+ }
+
+ exit();
+ }
/*