summaryrefslogtreecommitdiff
path: root/actions/twitapiaccount.php
diff options
context:
space:
mode:
authorZach Copley <zach@controlyourself.ca>2009-03-04 16:17:40 -0800
committerZach Copley <zach@controlyourself.ca>2009-03-04 16:17:40 -0800
commit36bb33fb1d7b4befe2fb68c2eef0712619359293 (patch)
treea4eeed358907f9d4984f82723f72c40924742cf3 /actions/twitapiaccount.php
parent78a715bc37041a852d9e0eb6dc3e3dc0a0b9e279 (diff)
Made /api/account/verify_credentials.format return an extended user object. Updates to status and user API objects.
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);