From: Andrew Dolgov Date: Mon, 28 Nov 2011 05:35:13 +0000 (+0400) Subject: implement getApiLevel X-Git-Tag: 1.5.8~48 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=582f41e2c16a5235c8315071a4c4d8352ec209d6;p=tt-rss.git implement getApiLevel --- diff --git a/api/index.php b/api/index.php index 333eb0dc..e00ca097 100644 --- a/api/index.php +++ b/api/index.php @@ -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); @@ -78,6 +80,11 @@ 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"];