Commit Graph

51 Commits

Author SHA1 Message Date
95d2b0095b Linting 2022-01-03 18:23:49 +01:00
4d3d8c874c Moved cors allowed origins to conf file. 2020-04-08 23:17:45 +02:00
aa4a1c2a57 Registed route watch-link, by title & year
Fetch watch link for plex item matching query parameters title and year.
2020-02-21 21:53:51 +01:00
259ed9b06f Error. Fixed capitalization of file name. 2019-12-25 21:12:29 +01:00
f8847c62f2 UserRepository handles updating db settings better.
Moved the plex_userid to settings to expanded with functions for
updating and fetching settings, each with its own helper function
towards the database.
Since we had a linkPlexUserId function and we dont want plex_userid to
be updated from the updatesettings function we moved unlinking to a
separate endpoint and class function.
Also a new controller and endpoints for getting and updating settings.
2019-12-22 13:30:18 +01:00
510c014549 Added endpoint for getting plays grouped by days of week. 2019-11-11 17:59:16 +01:00
2650497986 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
2019-11-04 23:11:00 +01:00
639f0ec17a Created middleware to check if the user has a plex user linked to seasoned account. If not respond with 403 meaning you did have a authorization key, but this is forbidden; explaining in the response message that no plex account user id was found for this user and to please authenticate their plex account at authenticate endpoint. 2019-11-04 23:04:42 +01:00
601fc1d0de Renamed search_history controller to searchHistory 2019-11-04 22:57:59 +01:00
acc26a2f09 Renamed user history to search_history and fixed an issue where search history received the entire user object and not just the username 2019-11-04 20:32:41 +01:00
05b001de2e Created endpoint for authenticating with plex and linking your plex user to the logged in seasoned user. User database table gets a new plex_userid column. This will be used to fetch tautulli stats for your account. 2019-11-04 00:43:42 +01:00
b802a7b62b Moved, renamed, re-did and added a lot of stuff. Getting ready for the v2 upgrade 2019-11-03 20:33:30 +01:00
bc3d4881bd New release_dates endpoint for movie 2019-11-03 15:43:35 +01:00
9f1badc1b1 Get a request item by id and type 2019-06-28 19:21:54 +02:00
5d6f2baa34 plex hook should have post not get 2019-06-05 00:00:31 +02:00
840816c930 request returns all requested items. Optional sort, query and filter params. 2018-11-10 01:50:24 +01:00
91d238de7c Request id is now passed as body param. Database default timestamp value changed to epoch time. 2018-11-09 22:13:00 +01:00
e64c4d5d01 Lists are now reachable by movie or show / listname. Endpoints added & removed outdated comments. 2018-11-01 00:17:51 +01:00
5a48158f07 Request now happens at /request with id parameter and query for type selection. Only allows movie or show type and is static set in the controller. AddRequest adds tmdb item to database with time of request. 2018-10-30 19:20:52 +01:00
8f5bd44e4d Added endpoint for new plex search. 2018-10-29 20:57:22 +01:00
41d6bba743 v2 endpoints added for clearer intent in endpoints. Two new controller categories; info and search. 2018-10-28 12:21:47 +01:00
657ab10034 Removed unused comments. 2018-05-06 18:36:26 +02:00
27c95375e2 Reverted back to only be authenticated beacuse something wrong with getting the correct user. Will replace with admin check as middleware when fixed. 2018-03-07 01:37:42 +01:00
59b206bf2d Forgot a leading / 2018-03-06 22:13:53 +01:00
fac9e0e425 Added a endpoint to fetch a random emoji. 2018-03-06 22:02:32 +01:00
2df734bb32 ADded endpoints for checking search history and the items a user has requested, both require authentication. Changed that searching for torrents now require being admin not just signed in. 2018-03-06 19:20:32 +01:00
93e1ef6d99 Linted app and server.js files. 2018-02-07 13:52:39 +01:00
44878a295c Merge branch 'api_fixes' of github.com:kevinmidboe/seasonedShows into api_fixes 2018-02-05 14:25:25 +01:00
9b0fa88a72 Changed docstring and removed the unused port variable. 2018-02-05 14:25:13 +01:00
77d7167fcb Changed so that one must not be auth to get requested elements. This might change. 2018-02-05 14:22:44 +01:00
2fc9674548 Added some todos for routers/middleware and setup so that raven will be used for error handling and gets value from config file. 2017-11-04 18:11:44 +01:00
7cce61b3bb Setup for sentry. Need to add __DSN__ value manually. 2017-10-26 15:19:10 +02:00
e417fedece Now follows our airbnb linting schema. 2017-10-26 14:52:00 +02:00
40928a6e46 Added docstring 2017-10-23 14:59:58 +02:00
c48db517ac Created one function for searching for different tmdb lists. This replaces 4 endpoints so we have a single way of searching for lists. 2017-10-23 14:58:52 +02:00
d2d791f5b2 added loggedinuser as acceptable header. 2017-10-22 17:31:37 +02:00
d1d204691a Changed from GET to POST 2017-10-21 15:28:32 +02:00
4c7be51a61 Added endpoint for add and now user must be authenticated for both pirate endpoints. 2017-10-21 15:27:21 +02:00
799b8731c5 Merge pull request #46 from KevinMidboe/api/update_requested
Api/update requested
2017-10-21 12:46:32 +02:00
74ea05cf17 Fixed error where the was an extra ' character. 2017-10-21 12:45:31 +02:00
3c039447f5 Renamed the endpoint to search. 2017-10-21 12:29:28 +02:00
67d343e446 Added endpoint for searching the bay 2017-10-21 10:01:16 +02:00
51d446f378 Added endpoint for updating a requested item. 2017-10-06 15:02:44 +02:00
f8ff71bcff Removed a no longer used ip address for allowed origins. 2017-10-06 12:14:05 +02:00
7e27e19a0d Added more strict header allowence and was a error where endpoints for user was not using router, but app. 2017-10-06 12:12:21 +02:00
e43bcbdd52 Added endpoint for getting all requests. 2017-09-27 17:54:34 +02:00
bab4af08d9 Added the use of tokenToUser so that it is verified that a valid token is in the request header when doing actions that need login verification. 2017-09-27 16:27:05 +02:00
bb6dd1ad59 Added middleware for authentiaction, endpoints for a user and import for token handling. 2017-09-27 14:02:59 +02:00
28d0b63960 Added TODO and a output of what is requested in the router 2017-09-03 18:17:07 +02:00
2dc22b386d Added endpoints for discover media (either movie or show), getUpcoming movies, nowPlaying (movies or shows), popular (movie or show) and search similar where the type movie/show must be defined 2017-09-03 17:02:02 +02:00