1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586 |
- <?php
- if (!defined('STATUSNET')) {
- exit(1);
- }
- class ApiAccountVerifyCredentialsAction extends ApiAuthAction
- {
- protected function handle()
- {
- parent::handle();
- if (!in_array($this->format, array('xml', 'json'))) {
-
- $this->clientError(_('API method not found.'), $code = 404);
- }
- $twitter_user = $this->twitterUserArray($this->auth_user->getProfile(), true);
- if ($this->format == 'xml') {
- $this->initDocument('xml');
- $this->showTwitterXmlUser($twitter_user, 'user', true);
- $this->endDocument('xml');
- } elseif ($this->format == 'json') {
- $this->initDocument('json');
- $this->showJsonObjects($twitter_user);
- $this->endDocument('json');
- }
- }
-
- function isReadOnly($args)
- {
- return true;
- }
- }
|