diff options
author | Evan Prodromou <evan@controlyourself.ca> | 2009-03-05 11:04:16 -0800 |
---|---|---|
committer | Evan Prodromou <evan@controlyourself.ca> | 2009-03-05 11:04:16 -0800 |
commit | 6ce7d0c567b23d3bec035a9c4428399bdfdb896b (patch) | |
tree | ae887738020b1c67cd57aa247f4c326fe331a048 /actions/twitapiaccount.php | |
parent | b9781258bbfaac0e7fc91af4f77f1f340274a88e (diff) | |
parent | 3087e4ad5dfbccb7218c12ca747e1dbcf3a6415c (diff) |
Merge branch '0.7.x' of git@gitorious.org:laconica/dev into 0.7.x
Diffstat (limited to 'actions/twitapiaccount.php')
-rw-r--r-- | actions/twitapiaccount.php | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/actions/twitapiaccount.php b/actions/twitapiaccount.php index c19cd370d..68a18cb57 100644 --- a/actions/twitapiaccount.php +++ b/actions/twitapiaccount.php @@ -23,22 +23,24 @@ require_once(INSTALLDIR.'/lib/twitterapi.php'); class TwitapiaccountAction extends TwitterapiAction { - function verify_credentials($args, $apidata) { - if ($apidata['content-type'] == 'xml') { - header('Content-Type: application/xml; charset=utf-8'); - print '<authorized>true</authorized>'; - } elseif ($apidata['content-type'] == 'json') { - header('Content-Type: application/json; charset=utf-8'); - print '{"authorized":true}'; - } else { + parent::handle($args); + + switch ($apidata['content-type']) { + case 'xml': + case 'json': + $action_obj = new TwitapiusersAction(); + $action_obj->prepare($args); + call_user_func(array($action_obj, 'show'), $args, $apidata); + break; + default: header('Content-Type: text/html; charset=utf-8'); print 'Authorized'; } } - function end_session($args, $apidata) + function end_session($args, $apidata) { parent::handle($args); $this->serverError(_('API method under construction.'), $code=501); |