]> git.wh0rd.org Git - tt-rss.git/commitdiff
implement getApiLevel
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Mon, 28 Nov 2011 05:35:13 +0000 (09:35 +0400)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Mon, 28 Nov 2011 05:35:13 +0000 (09:35 +0400)
api/index.php

index 333eb0dc96adb4dbe015d40da2dd4bb386bef9b4..e00ca097d44c0d8498da6ecd2a02c1df27871363 100644 (file)
@@ -7,6 +7,8 @@
        require_once "../db-prefs.php";
        require_once "../functions.php";
 
+       define('API_LEVEL', 1);
+
        define('API_STATUS_OK', 0);
        define('API_STATUS_ERR', 1);
 
                        print api_wrap_reply(API_STATUS_OK, $seq, $rv);
                        break;
 
+               case "getApiLevel":
+                       $rv = array("level" => API_LEVEL);
+                       print api_wrap_reply(API_STATUS_OK, $seq, $rv);
+                       break;
+
                case "login":
                        $login = db_escape_string($_REQUEST["user"]);
                        $password = $_REQUEST["password"];