123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103 |
- <?php
- if (!defined('STATUSNET')) {
- exit(1);
- }
- class ApiHelpTestAction extends ApiPrivateAuthAction
- {
-
- function prepare($args)
- {
- parent::prepare($args);
- return true;
- }
-
- function handle($args)
- {
- parent::handle($args);
- if ($this->format == 'xml') {
- $this->initDocument('xml');
- $this->element('ok', null, 'true');
- $this->endDocument('xml');
- } elseif ($this->format == 'json') {
- $this->initDocument('json');
- print '"ok"';
- $this->endDocument('json');
- } else {
- $this->clientError(
-
- _('API method not found.'),
- 404,
- $this->format
- );
- }
- }
-
- function isReadOnly($args)
- {
- return true;
- }
- }
|