summaryrefslogtreecommitdiff
path: root/actions/twitapiaccount.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@controlyourself.ca>2009-03-06 16:17:58 -0800
committerEvan Prodromou <evan@controlyourself.ca>2009-03-06 16:17:58 -0800
commit13c183e2f4e0738233658ca79103bbe4a6d57992 (patch)
tree298b18c43906919b2ee615e20f3507f333354575 /actions/twitapiaccount.php
parent9a2f3358537566084a29fd421891fbc236185e9f (diff)
parent0617c7b7730e4e42cd6285737f9fe999688fbdc6 (diff)
Merge branch '0.7.x' into 0.8.x
Diffstat (limited to 'actions/twitapiaccount.php')
-rw-r--r--actions/twitapiaccount.php20
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);