]> git.mxchange.org Git - quix0rs-gnu-social.git/blob - _darcs/tentative_pristine
implement api/laconica/version method
[quix0rs-gnu-social.git] / _darcs / tentative_pristine
1 hunk ./actions/twitapilaconica.php 56
2 +     * URL: http://identi.ca/api/laconica/version.(xml|json)
3 +     * Formats: xml, json
4 hunk ./actions/twitapilaconica.php 70
5 -        common_server_error(_('API method under construction.'), 501);
6 +        switch ($apidata['content-type']) {
7 +         case 'xml':
8 +            $this->init_document('xml');
9 +            common_element('version', null, LACONICA_VERSION);
10 +            $this->end_document('xml');
11 +         case 'json':
12 +            $this->init_document('json');
13 +            print '"'.LACONICA_VERSION.'"';
14 +            $this->end_document('json');
15 +         default:
16 +            $this->client_error(_('API method not found!'), $code=404);
17 +        }