Tautulli will serve all the tautulli api calls. Mostly this will be used by user requests for getting stats related to the logged in user. WIP but currently watch time stats, plays by number of days, and view history has been implemented.
TODO: - Error handling if tautulli request fails. - Filter the responses and/or limit them from tautulli - Handle parsing variable parameters from request
This commit is contained in:
@@ -8,6 +8,7 @@ const mustHaveAccountLinkedToPlex = require('./middleware/mustHaveAccountLinkedT
|
||||
const configuration = require('src/config/configuration').getInstance();
|
||||
|
||||
const listController = require('./controllers/list/listController');
|
||||
const tautulli = require('./controllers/user/viewHistory.js');
|
||||
|
||||
// TODO: Have our raven router check if there is a value, if not don't enable raven.
|
||||
Raven.config(configuration.get('raven', 'DSN')).install();
|
||||
@@ -58,6 +59,10 @@ router.get('/v1/user/search_history', mustBeAuthenticated, require('./controller
|
||||
router.get('/v1/user/requests', mustBeAuthenticated, require('./controllers/user/requests.js'));
|
||||
router.post('/v1/user/authenticate', mustBeAuthenticated, require('./controllers/user/authenticatePlexAccount.js'));
|
||||
|
||||
router.get('/v1/user/view_history', mustHaveAccountLinkedToPlex, tautulli.userViewHistoryController);
|
||||
router.get('/v1/user/watch_time', mustHaveAccountLinkedToPlex, tautulli.watchTimeStatsController);
|
||||
router.get('/v1/user/plays_by_day', mustHaveAccountLinkedToPlex, tautulli.getPlaysByDaysController);
|
||||
|
||||
/**
|
||||
* Seasoned
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user