summaryrefslogtreecommitdiff
path: root/_darcs/tentative_pristine
blob: 02f15d0f665515bb73b2fc8c2ee0e018abc68c5b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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);
+        }