The asssignment for this week is to build and express api with a few endpoints, returning both a single item and a collection of items. I have chosen the netflix titles data and created endpoints to return:
-
all titles (lars-new-express-api.herokuapp.com/titles/tv-shows)
-
all movies (lars-new-express-api.herokuapp.com/titles/movies)
-
all tv-shows (lars-new-express-api.herokuapp.com/titles/tv-shows)
-
all titles from a certain release year (params) (lars-new-express-api.herokuapp.com/titles/year/[year])
-
all titles where title, description or cast matches a search (query) (lars-new-express-api.herokuapp.com/titles/search?searchTerm=[search])
I had hoped to have more time for this weeks project, if so i would have:
- added a frontend with inputs and a nice way to present the results in a list or cards. Maybe even a loader!
- made more endpoints with more interesting logic, such as creating a list of all genres or categorys
- made better handling of errors and empty returns