diff options
author | Bernhard Posselt <nukeawhale@gmail.com> | 2013-03-21 12:56:14 +0100 |
---|---|---|
committer | Bernhard Posselt <nukeawhale@gmail.com> | 2013-03-21 12:56:14 +0100 |
commit | aa4916b829fd509735f529d3dd961cd17feb6d57 (patch) | |
tree | 82550df94bde4af531f9b6fabbafdca10f646745 /appinfo | |
parent | f435e1261b7a993f9520b5a887af0083a6c4f001 (diff) |
wired routing
Diffstat (limited to 'appinfo')
-rw-r--r-- | appinfo/routes.php | 150 |
1 files changed, 147 insertions, 3 deletions
diff --git a/appinfo/routes.php b/appinfo/routes.php index ab9e173fc..18333c3c0 100644 --- a/appinfo/routes.php +++ b/appinfo/routes.php @@ -36,18 +36,162 @@ 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()); + } +); + +/** + * 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()); + } +); /** * External API |