diff options
author | Alessandro Cosentino <cosenal@gmail.com> | 2013-03-21 15:01:21 +0100 |
---|---|---|
committer | Alessandro Cosentino <cosenal@gmail.com> | 2013-03-21 15:01:21 +0100 |
commit | c4073af48a9516b8c1b70e435d866ef51ddcde36 (patch) | |
tree | 6bcd69692ed3d8230cc28f305e896de6a481af8c | |
parent | c6536aa52534b35f99794a0f1ff0eaeb167d561d (diff) | |
parent | 2452dfa4015ed2a6fc9b70d897ba6ca7da009193 (diff) |
Merge branch 'master' of github.com:owncloud/news
-rw-r--r-- | appinfo/routes.php | 150 | ||||
-rw-r--r-- | bl/feedbl.php | 55 | ||||
-rw-r--r-- | bl/itembl.php | 38 | ||||
-rw-r--r-- | controller/exportcontroller.php | 41 | ||||
-rw-r--r-- | controller/feedcontroller.php | 12 | ||||
-rw-r--r-- | controller/foldercontroller.php | 16 | ||||
-rw-r--r-- | controller/itemcontroller.php | 46 | ||||
-rw-r--r-- | controller/pagecontroller.php | 50 | ||||
-rw-r--r-- | controller/usersettingscontroller.php | 46 | ||||
-rw-r--r-- | dependencyinjection/dicontainer.php | 47 | ||||
-rw-r--r-- | js/app/services/persistence.coffee | 38 | ||||
-rw-r--r-- | js/public/app.js | 38 | ||||
-rw-r--r-- | js/tests/services/persistenceSpec.coffee | 40 | ||||
-rw-r--r-- | tests/controller/FolderControllerTest.php | 16 |
14 files changed, 511 insertions, 122 deletions
diff --git a/appinfo/routes.php b/appinfo/routes.php index ab9e173fc..85e63486e 100644 --- a/appinfo/routes.php +++ b/appinfo/routes.php @@ -36,22 +36,164 @@ use \OCA\News\DependencyInjection\DIContainer; $this->create('news_index', '/')->get()->action( function($params){ - //App::main('FolderController', 'getAll', $params, new DIContainer()); + App::main('PageController', 'index', $params, new DIContainer()); } ); - +/** + * Folders + */ $this->create('news_folders', '/folders')->get()->action( function($params){ - App::main('FolderController', 'getAll', $params, new DIContainer()); + App::main('FolderController', 'folders', $params, new DIContainer()); + } +); + +$this->create('news_folders_open', '/folders/{folderId}/open')->post()->action( + function($params){ + App::main('FolderController', 'open', $params, new DIContainer()); + } +); + +$this->create('news_folders_collapse', '/folders/{folderId}/collapse')->post()->action( + function($params){ + App::main('FolderController', 'collapse', $params, new DIContainer()); + } +); + +$this->create('news_folders_create', '/folders/create')->post()->action( + function($params){ + App::main('FolderController', 'create', $params, new DIContainer()); + } +); + +$this->create('news_folders_delete', '/folders/{folderId}/delete')->post()->action( + function($params){ + App::main('FolderController', 'delete', $params, new DIContainer()); + } +); + +$this->create('news_folders_rename', '/folders/{folderId}/rename')->post()->action( + function($params){ + App::main('FolderController', 'rename', $params, new DIContainer()); + } +); + +/** + * Feeds + */ +$this->create('news_feeds', '/feeds')->get()->action( + function($params){ + App::main('FeedController', 'feeds', $params, new DIContainer()); + } +); + +$this->create('news_feeds_active', '/feeds/active')->get()->action( + function($params){ + App::main('FeedController', 'active', $params, new DIContainer()); + } +); + +$this->create('news_feeds_create', '/feeds/create')->post()->action( + function($params){ + App::main('FeedController', 'create', $params, new DIContainer()); + } +); + +$this->create('news_feeds_delete', '/feeds/{feedId}/delete')->post()->action( + function($params){ + App::main('FeedController', 'delete', $params, new DIContainer()); + } +); + +$this->create('news_feeds_update', '/feeds/{feedId}/update')->post()->action( + function($params){ + App::main('FeedController', 'update', $params, new DIContainer()); + } +); + +$this->create('news_feeds_move', '/feeds/{feedId}/move')->post()->action( + function($params){ + App::main('FeedController', 'move', $params, new DIContainer()); + } +); + +$this->create('news_feeds_read', '/feeds/{feedId}/read')->post()->action( + function($params){ + App::main('FeedController', 'read', $params, new DIContainer()); + } +); + +/** + * Items + */ +$this->create('news_items', '/items')->get()->action( + function($params){ + App::main('ItemController', 'items', $params, new DIContainer()); + } +); + +$this->create('news_items_starred', '/items/starred')->get()->action( + function($params){ + App::main('ItemController', 'starred', $params, new DIContainer()); + } +); + +$this->create('news_items_read', '/items/{itemId}/read')->post()->action( + function($params){ + App::main('ItemController', 'read', $params, new DIContainer()); + } +); + +$this->create('news_items_unread', '/items/{itemId}/unread')->post()->action( + function($params){ + App::main('ItemController', 'unread', $params, new DIContainer()); + } +); + +$this->create('news_items_star', '/items/{itemId}/star')->post()->action( + function($params){ + App::main('ItemController', 'star', $params, new DIContainer()); } ); +$this->create('news_items_unstar', '/items/{itemId}/unstar')->post()->action( + function($params){ + App::main('ItemController', 'unstar', $params, new DIContainer()); + } +); +/** + * Export + */ +$this->create('news_export_opml', '/export/opml')->get()->action( + function($params){ + App::main('ExportController', 'opml', $params, new DIContainer()); + } +); /** - * External API + * User Settings */ +$this->create('news_usersettings_read', '/usersettings/read')->get()->action( + function($params){ + App::main('UserSettingsController', 'read', $params, new DIContainer()); + } +); + +$this->create('news_usersettings_read_show', '/usersettings/read/show')->post()->action( + function($params){ + App::main('UserSettingsController', 'show', $params, new DIContainer()); + } +); + +$this->create('news_usersettings_read_hide', '/usersettings/read/hide')->post()->action( + function($params){ + App::main('UserSettingsController', 'hide', $params, new DIContainer()); + } +); + + /** * Feed API diff --git a/bl/feedbl.php b/bl/feedbl.php index 43e0faf6f..14182814e 100644 --- a/bl/feedbl.php +++ b/bl/feedbl.php @@ -1,33 +1,38 @@ <?php -namespace OCA\News; +/** +* ownCloud - News +* +* @author Alessandro Cosentino +* @author Bernhard Posselt +* @copyright 2012 Alessandro Cosentino cosenal@gmail.com +* @copyright 2012 Bernhard Posselt nukeawhale@gmail.com +* +* This library is free software; you can redistribute it and/or +* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE +* License as published by the Free Software Foundation; either +* version 3 of the License, or any later version. +* +* This library is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU AFFERO GENERAL PUBLIC LICENSE for more details. +* +* You should have received a copy of the GNU Affero General Public +* License along with this library. If not, see <http://www.gnu.org/licenses/>. +* +*/ -class FeedBl { +namespace OCA\News\Bl; + +use \OCA\News\Db\Feed; + + +class FeedBl extends Bl { public function __construct($feedMapper){ - $this->feedMapper = $feedMapper; - } - - public function getAll() { - return $this->feedMapper->findAll(); - } - - public function getById($feedid) { - return $this->feedMapper->findById($feedid); - } - - public function delete($feedid) { - return $this->feedMapper->deleteById($feedid); + parent::__construct($feedMapper); } - public function create($url, $folderid) { - $feed = new Feed($url); - $this->feedMapper->save($feed, $folderid); - $feed = Utils::fetch($url); - if ($feed != null) { - $this->feedMapper->save($feed, $folderid); - } - return true; - } - + } diff --git a/bl/itembl.php b/bl/itembl.php new file mode 100644 index 000000000..5f02f69ad --- /dev/null +++ b/bl/itembl.php @@ -0,0 +1,38 @@ +<?php + +/** +* ownCloud - News +* +* @author Alessandro Cosentino +* @author Bernhard Posselt +* @copyright 2012 Alessandro Cosentino cosenal@gmail.com +* @copyright 2012 Bernhard Posselt nukeawhale@gmail.com +* +* This library is free software; you can redistribute it and/or +* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE +* License as published by the Free Software Foundation; either +* version 3 of the License, or any later version. +* +* This library is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU AFFERO GENERAL PUBLIC LICENSE for more details. +* +* You should have received a copy of the GNU Affero General Public +* License along with this library. If not, see <http://www.gnu.org/licenses/>. +* +*/ + +namespace OCA\News\Bl; + +use \OCA\News\Db\Item; + + +class ItemBl extends Bl { + + public function __construct($itemMapper){ + parent::__construct($itemMapper); + } + + +} diff --git a/controller/exportcontroller.php b/controller/exportcontroller.php new file mode 100644 index 000000000..6c6d8a71c --- /dev/null +++ b/controller/exportcontroller.php @@ -0,0 +1,41 @@ +<?php + +/** +* ownCloud - News +* +* @author Alessandro Cosentino +* @author Bernhard Posselt +* @copyright 2012 Alessandro Cosentino cosenal@gmail.com +* @copyright 2012 Bernhard Posselt nukeawhale@gmail.com +* +* This library is free software; you can redistribute it and/or +* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE +* License as published by the Free Software Foundation; either +* version 3 of the License, or any later version. +* +* This library is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU AFFERO GENERAL PUBLIC LICENSE for more details. +* +* You should have received a copy of the GNU Affero General Public +* License along with this library. If not, see <http://www.gnu.org/licenses/>. +* +*/ + +namespace OCA\News\Controller; + +use \OCA\AppFramework\Controller\Controller; +use \OCA\AppFramework\Core\API; +use \OCA\AppFramework\Http\Request; + + +class ExportController extends Controller { + + + public function __construct(API $api, Request $request){ + parent::__construct($api, $request); + } + + +}
\ No newline at end of file diff --git a/controller/feedcontroller.php b/controller/feedcontroller.php index 4357d7682..85de04665 100644 --- a/controller/feedcontroller.php +++ b/controller/feedcontroller.php @@ -40,16 +40,4 @@ class FeedController extends Controller { $this->feedMapper = $feedMapper; } - - /** - * @IsAdminExemption - * @IsSubAdminExemption - * @Ajax - * - * Returns all feeds - */ - public function getAll(){ - $feeds = $this->feedMapper->findAll(); - return $this->renderJSON($feeds); - } }
\ No newline at end of file diff --git a/controller/foldercontroller.php b/controller/foldercontroller.php index 1bf7da664..3e631eb63 100644 --- a/controller/foldercontroller.php +++ b/controller/foldercontroller.php @@ -46,10 +46,8 @@ class FolderController extends Controller { * @IsAdminExemption * @IsSubAdminExemption * @Ajax - * - * Returns all folders */ - public function getAll(){ + public function folders(){ $folders = $this->folderBl->findAll($this->api->getUserId()); $result = array( 'folders' => $folders @@ -62,20 +60,8 @@ class FolderController extends Controller { * @IsAdminExemption * @IsSubAdminExemption * @Ajax - * - * Collapses a folder */ public function collapse(){ - $folderId = (int) $this->params('folderId'); - - try { - $this->folderMapper->setCollapsed($folderId, true); - return $this->renderJSON(array()); - } catch (DoesNotExistException $e) { - return $this->renderJSON(array(), $e->getMessage()); - } catch(MultipleObjectsReturnedException $e){ - return $this->renderJSON(array(), $e->getMessage()); - } } diff --git a/controller/itemcontroller.php b/controller/itemcontroller.php new file mode 100644 index 000000000..81e3dd972 --- /dev/null +++ b/controller/itemcontroller.php @@ -0,0 +1,46 @@ +<?php + +/** +* ownCloud - News +* +* @author Alessandro Cosentino +* @author Bernhard Posselt +* @copyright 2012 Alessandro Cosentino cosenal@gmail.com +* @copyright 2012 Bernhard Posselt nukeawhale@gmail.com +* +* This library is free software; you can redistribute it and/or +* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE +* License as published by the Free Software Foundation; either +* version 3 of the License, or any later version. +* +* This library is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU AFFERO GENERAL PUBLIC LICENSE for more details. +* +* You should have received a copy of the GNU Affero General Public +* License along with this library. If not, see <http://www.gnu.org/licenses/>. +* +*/ + +namespace OCA\News\Controller; + +use \OCA\AppFramework\Controller\Controller; +use \OCA\AppFramework\Core\API; +use \OCA\AppFramework\Http\Request; + +use \OCA\News\Bl\ItemBl; + + +class ItemController extends Controller { + + private $itemBl; + + public function __construct(API $api, Request $request, ItemBl $itemBl){ + parent::__construct($api, $request); + $this->itemBl = $itemBl + } + + + +}
\ No newline at end of file diff --git a/controller/pagecontroller.php b/controller/pagecontroller.php new file mode 100644 index 000000000..cf934422b --- /dev/null +++ b/controller/pagecontroller.php @@ -0,0 +1,50 @@ +<?php + +/** +* ownCloud - News +* +* @author Alessandro Cosentino +* @author Bernhard Posselt +* @copyright 2012 Alessandro Cosentino cosenal@gmail.com +* @copyright 2012 Bernhard Posselt nukeawhale@gmail.com +* +* This library is free software; you can redistribute it and/or +* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE +* License as published by the Free Software Foundation; either +* version 3 of the License, or any later version. +* +* This library is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU AFFERO GENERAL PUBLIC LICENSE for more details. +* +* You should have received a copy of the GNU Affero General Public +* License along with this library. If not, see <http://www.gnu.org/licenses/>. +* +*/ + +namespace OCA\News\Controller; + +use \OCA\AppFramework\Controller\Controller; +use \OCA\AppFramework\Core\API; +use \OCA\AppFramework\Http\Request; + + +class PageController extends Controller { + + + public function __construct(API $api, Request $request){ + parent::__construct($api, $request); + } + + + /** + * @IsAdminExemption + * @IsSubAdminExemption + * @CSRFExemption + */ + public function index() { + } + + +}
\ No newline at end of file diff --git a/controller/usersettingscontroller.php b/controller/usersettingscontroller.php new file mode 100644 index 000000000..fd77a394f --- /dev/null +++ b/controller/usersettingscontroller.php @@ -0,0 +1,46 @@ +<?php + +/** +* ownCloud - News +* +* @author Alessandro Cosentino +* @author Bernhard Posselt +* @copyright 2012 Alessandro Cosentino cosenal@gmail.com +* @copyright 2012 Bernhard Posselt nukeawhale@gmail.com +* +* This library is free software; you can redistribute it and/or +* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE +* License as published by the Free Software Foundation; either +* version 3 of the License, or any later version. +* +* This library is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU AFFERO GENERAL PUBLIC LICENSE for more details. +* +* You should have received a copy of the GNU Affero General Public +* License along with this library. If not, see <http://www.gnu.org/licenses/>. +* +*/ + +namespace OCA\News\Controller; + +use \OCA\AppFramework\Controller\Controller; +use \OCA\AppFramework\Core\API; +use \OCA\AppFramework\Http\Request; + +use \OCA\News\Bl\FeedBl; + + +class FeedController extends Controller { + + private $feedBl; + + public function __construct(API $api, Request $request, FeedBl $feedBl){ + parent::__construct($api, $request); + $this->feedBl = $feedBl + } + + + +}
\ No newline at end of file diff --git a/dependencyinjection/dicontainer.php b/dependencyinjection/dicontainer.php index 874360b9c..4027f5589 100644 --- a/dependencyinjection/dicontainer.php +++ b/dependencyinjection/dicontainer.php @@ -27,9 +27,20 @@ namespace OCA\News\DependencyInjection; use OCA\AppFramework\DependencyInjection\DIContainer as BaseContainer; +use OCA\News\Controller\PageController; use OCA\News\Controller\FolderController; +use OCA\News\Controller\FeedController; +use OCA\News\Controller\ItemController; +use OCA\News\Controller\ExportController; +use OCA\News\Controller\UserSettingsController; + use OCA\News\Bl\FolderBl; +use OCA\News\Bl\FeedBl; +use OCA\News\Bl\ItemBl; + use OCA\News\Db\FolderMapper; +use OCA\News\Db\FeedMapper; +use OCA\News\Db\ItemMapper; class DIContainer extends BaseContainer { @@ -46,10 +57,31 @@ class DIContainer extends BaseContainer { /** * CONTROLLERS */ + $this['PageController'] = $this->share(function($c){ + return new PageController($c['API'], $c['Request']); + }); + $this['FolderController'] = $this->share(function($c){ return new FolderController($c['API'], $c['Request'], $c['FolderBl']); }); + $this['FeedController'] = $this->share(function($c){ + return new FeedController($c['API'], $c['Request'], $c['FeedBl']); + }); + + $this['ItemController'] = $this->share(function($c){ + return new ItemController($c['API'], $c['Request'], $c['ItemBl']); + }); + + $this['ExportController'] = $this->share(function($c){ + return new ExportController($c['API'], $c['Request'], + $c['FolderBl'], $c['FeedBl']); + }); + + $this['UserSettingsController'] = $this->share(function($c){ + return new UserSettingsController($c['API'], $c['Request']); + }); + /** * Business */ @@ -57,6 +89,15 @@ class DIContainer extends BaseContainer { return new FolderBl($c['FolderMapper']); }); + $this['FeedBl'] = $this->share(function($c){ + return new FeedBl($c['FeedMapper']); + }); + + $this['ItemBl'] = $this->share(function($c){ + return new ItemBl($c['ItemMapper']); + }); + + /** * MAPPERS */ @@ -64,7 +105,13 @@ class DIContainer extends BaseContainer { return new FolderMapper($c['API']); }); + $this['FeedMapper'] = $this->share(function($c){ + return new FeedMapper($c['API']); + }); + $this['ItemMapper'] = $this->share(function($c){ + return new ItemMapper($c['API']); + }); } } diff --git a/js/app/services/persistence.coffee b/js/app/services/persistence.coffee index 9070a9a68..80d8d391d 100644 --- a/js/app/services/persistence.coffee +++ b/js/app/services/persistence.coffee @@ -73,7 +73,7 @@ angular.module('News').factory '_Persistence', -> getStarredItems: (onSuccess) -> params = onSuccess: onSuccess - @_request.get 'news_starred_items', params + @_request.get 'news_items_starred', params starItem: (itemId) -> @@ -84,7 +84,7 @@ angular.module('News').factory '_Persistence', -> urlParams: itemId: itemId - @_request.post 'news_star_item', params + @_request.post 'news_items_star', params @@ -96,7 +96,7 @@ angular.module('News').factory '_Persistence', -> urlParams: itemId: itemId - @_request.post 'news_unstar_item', params + @_request.post 'news_items_unstar', params readItem: (itemId) -> @@ -107,7 +107,7 @@ angular.module('News').factory '_Persistence', -> urlParams: itemId: itemId - @_request.post 'news_read_item', params + @_request.post 'news_items_read', params @@ -119,7 +119,7 @@ angular.module('News').factory '_Persistence', -> urlParams: itemId: itemId - @_request.post 'news_unread_item', params + @_request.post 'news_items_unread', params ### @@ -137,7 +137,7 @@ angular.module('News').factory '_Persistence', -> params = onSuccess: onSuccess - @_request.get 'news_active_feed', params + @_request.get 'news_feeds_active', params createFeed: (url, parentFolderId, onSuccess, onFailure) -> @@ -148,7 +148,7 @@ angular.module('News').factory '_Persistence', -> onSuccess: onSuccess onFailure: onFailure - @_request.post 'news_create_feed', params + @_request.post 'news_feeds_create', params deleteFeed: (feedId) -> @@ -156,7 +156,7 @@ angular.module('News').factory '_Persistence', -> urlParams: feedId: feedId - @_request.post 'news_delete_feed', params + @_request.post 'news_feeds_delete', params moveFeed: (feedId, folderId) -> @@ -169,7 +169,7 @@ angular.module('News').factory '_Persistence', -> data: folderId: folderId - @_request.post 'news_move_feed', params + @_request.post 'news_feeds_move', params setFeedRead: (feedId, highestItemId) -> @@ -182,7 +182,7 @@ angular.module('News').factory '_Persistence', -> data: highestItemId: highestItemId - @_request.post 'news_set_feed_read', params + @_request.post 'news_feeds_read', params updateFeed: (feedId) -> @@ -193,7 +193,7 @@ angular.module('News').factory '_Persistence', -> urlParams: feedId: feedId - @_request.post 'news_update_feed', params + @_request.post 'news_feeds_update', params ### @@ -215,7 +215,7 @@ angular.module('News').factory '_Persistence', -> urlParams: folderId: folderId - @_request.post 'news_open_folder', params + @_request.post 'news_folders_open', params collapseFolder: (folderId) -> @@ -226,7 +226,7 @@ angular.module('News').factory '_Persistence', -> urlParams: folderId: folderId - @_request.post 'news_collapse_folder', params + @_request.post 'news_folders_collapse', params createFolder: (folderName, parentFolderId=0, onSuccess=null, @@ -241,7 +241,7 @@ angular.module('News').factory '_Persistence', -> onSuccess: onSuccess onFailure: onFailure - @_request.post 'news_create_folder', params + @_request.post 'news_folders_create', params deleteFolder: (folderId) -> @@ -253,7 +253,7 @@ angular.module('News').factory '_Persistence', -> folderId: folderId - @_request.post 'news_delete_folder', params + @_request.post 'news_folders_delete', params renameFolder: (folderId, folderName) -> @@ -266,7 +266,7 @@ angular.module('News').factory '_Persistence', -> data: folderName: folderName - @_request.post 'news_rename_folder', params + @_request.post 'news_folders_rename', params @@ -291,21 +291,21 @@ angular.module('News').factory '_Persistence', -> params = onSuccess: callback - @_request.get 'news_user_settings_read', params + @_request.get 'news_usersettings_read', params userSettingsReadShow: -> ### Sets the reader mode to show all ### - @_request.post 'news_user_settings_read_show' + @_request.post 'news_usersettings_read_show' userSettingsReadHide: -> ### Sets the reader mode to show only unread ### - @_request.post 'news_user_settings_read_hide' + @_request.post 'news_usersettings_read_hide' _trigerHideRead: -> diff --git a/js/public/app.js b/js/public/app.js index 49abacf91..84953edac 100644 --- a/js/public/app.js +++ b/js/public/app.js @@ -522,7 +522,7 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>. params = { onSuccess: onSuccess }; - return this._request.get('news_starred_items', params); + return this._request.get('news_items_starred', params); }; Persistence.prototype.starItem = function(itemId) { @@ -536,7 +536,7 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>. itemId: itemId } }; - return this._request.post('news_star_item', params); + return this._request.post('news_items_star', params); }; Persistence.prototype.unstarItem = function(itemId) { @@ -550,7 +550,7 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>. itemId: itemId } }; - return this._request.post('news_unstar_item', params); + return this._request.post('news_items_unstar', params); }; Persistence.prototype.readItem = function(itemId) { @@ -564,7 +564,7 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>. itemId: itemId } }; - return this._request.post('news_read_item', params); + return this._request.post('news_items_read', params); }; Persistence.prototype.unreadItem = function(itemId) { @@ -578,7 +578,7 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>. itemId: itemId } }; - return this._request.post('news_unread_item', params); + return this._request.post('news_items_unread', params); }; /* @@ -600,7 +600,7 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>. params = { onSuccess: onSuccess }; - return this._request.get('news_active_feed', params); + return this._request.get('news_feeds_active', params); }; Persistence.prototype.createFeed = function(url, parentFolderId, onSuccess, onFailure) { @@ -613,7 +613,7 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>. onSuccess: onSuccess, onFailure: onFailure }; - return this._request.post('news_create_feed', params); + return this._request.post('news_feeds_create', params); }; Persistence.prototype.deleteFeed = function(feedId) { @@ -623,7 +623,7 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>. feedId: feedId } }; - return this._request.post('news_delete_feed', params); + return this._request.post('news_feeds_delete', params); }; Persistence.prototype.moveFeed = f |