Api/v2 #111
Reference in New Issue
Block a user
No description provided.
Delete Branch "api/v2"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
TMDB
endpoint: Info
Info for the movie, show & person has been rewritten to each having their own [movie|show|person]Info controller, converter from tmdb and functions that each create class object of class movie, show or person and returns them as json.
endpoint: Search
Each search operation has their own endpoint with query params. When searching under multisearch the response is mapped to create movie, show or person class objects.
endpoint: List
Listnames available for movies are: now playing, popular, top rated and upcoming; & for shows: now playing, popular and top rated.
class: Types (movie, show & person)
Types movie, show and person added to Types folder in tmdb (src/tmdb/types/)
Plex
endpoint: Plex Search
Searches local plex library defined by plex: ip in conf/development. In the response we are interested in media of type movie, show or episode. If they are found the media responses are converted to class functions of type; movie, show or episode, before returned as json objects.
function: existsInPlex(tmdb)
Based on a tmdb input and searches based on tmdb.title and checks if the response title and type match. If they do a existsInPlex=true object variable is added to the tmdb object.
Request
endpoint: Request
Handling of sort, filter and querying has been improved to neatly be handled with modular promise returning functions for (checking if valid) sort, filter and query.
User data transfer handling and JWT
While authenticated before we would return a json object with the
asdf
sdf
asd
now we send the authorization JWT token with body including the token
token: JWT_TOKENand conditionally if admin user a booleanadmin: true.User cryptography
()[
8a5ab204e1]Changed node package for creating a hashed password from
bcrypt-nodejs: v0.0.3tobcrypt: v3.0.6.Altered response message for invalid credentials.
When hashing we use 10 saltRounds ()[salt rounds]
Updating request status by searching for existence in plex
af7b1f2424Testing and documentation
Added documentation package and yarn commands script commands for generating documentation. [
6f9ca9e067]Tests
Cleaned up formatting and better about how and when we cache or create requests.
Example config file
Pull Request Test Coverage Report for Build 387
💛 - Coveralls
Too much to comment. Everything has been refactored and there might be some bugs or formatting/structure inconsistencies still.
Closing PR even though everything should have been commented and documented, but I want to get on with my life 🌝 Complete refactor will come later.