diff options
author | Andrew Dolgov <[email protected]> | 2013-03-28 11:04:15 +0400 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2013-03-28 11:04:27 +0400 |
commit | 0bb5833beb77e845c7a16b72006276b5f5e7d84b (patch) | |
tree | b3e02147667b0abbd98abdbe065cccf9581f4033 /classes/api.php | |
parent | f9432f2630e9340cd6a45842b453d3bf78ace0f7 (diff) |
api: add getFeedTree
Diffstat (limited to 'classes/api.php')
-rw-r--r-- | classes/api.php | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/classes/api.php b/classes/api.php index 2b9c3a148..1efa3865f 100644 --- a/classes/api.php +++ b/classes/api.php @@ -704,6 +704,20 @@ class API extends Handler { } } + function getFeedTree() { + $pf = new Pref_Feeds($this->link, $_REQUEST); + + $_REQUEST['mode'] = 2; + + if ($pf){ + $data = $pf->makefeedtree(); + print $this->wrap(self::STATUS_OK, array("categories" => $data)); + } else { + print $this->wrap(self::STATUS_ERR, array("error" => + 'UNABLE_TO_INSTANTIATE_OBJECT')); + } + + } } ?> |