summaryrefslogtreecommitdiffstats
path: root/api/newsapi.php
diff options
context:
space:
mode:
Diffstat (limited to 'api/newsapi.php')
-rw-r--r--api/newsapi.php19
1 files changed, 10 insertions, 9 deletions
diff --git a/api/newsapi.php b/api/newsapi.php
index aaed92926..322defead 100644
--- a/api/newsapi.php
+++ b/api/newsapi.php
@@ -25,23 +25,24 @@
namespace OCA\News\API;
-use \OCA\AppFramework\Core\API;
-use \OCA\AppFramework\Controller\Controller;
-use \OCA\AppFramework\Http\Request;
-use \OCA\AppFramework\Http\JSONResponse;
-use \OCA\AppFramework\Http\Response;
-use \OCA\AppFramework\Http\Http;
+use \OCP\IRequest;
+use \OCP\AppFramework\Controller;
+use \OCP\AppFramework\Http;
+use \OCP\AppFramework\Http\JSONResponse;
+use \OCP\AppFramework\Http\Response;
use \OCA\News\Utility\Updater;
-
+use \OCA\News\Core\API;
class NewsAPI extends Controller {
private $updater;
+ private $api;
- public function __construct(API $api, Request $request, Updater $updater){
- parent::__construct($api, $request);
+ public function __construct(API $api, IRequest $request, Updater $updater){
+ parent::__construct($api->getAppName(), $request);
$this->updater = $updater;
+ $this->api = $api;
}