gnu-social/_darcs/tentative_pristine
Evan Prodromou a3f601cd4e implement api/laconica/version method
darcs-hash:20081230205939-84dde-4b6096859c6b44169dd3d809442fab15337061b2.gz
2008-12-30 15:59:39 -05:00

18 lines
707 B
Plaintext

hunk ./actions/twitapilaconica.php 56
+ * URL: http://identi.ca/api/laconica/version.(xml|json)
+ * Formats: xml, json
hunk ./actions/twitapilaconica.php 70
- common_server_error(_('API method under construction.'), 501);
+ switch ($apidata['content-type']) {
+ case 'xml':
+ $this->init_document('xml');
+ common_element('version', null, LACONICA_VERSION);
+ $this->end_document('xml');
+ case 'json':
+ $this->init_document('json');
+ print '"'.LACONICA_VERSION.'"';
+ $this->end_document('json');
+ default:
+ $this->client_error(_('API method not found!'), $code=404);
+ }