This is just a small service using Play 2.6 and a few other tools I was interested in experimenting with including:
All endpoints validate the userId's and itemId's ensuring they're of correct length and only contain valid alphanumeric characters
- GET /example Returns the users current watch list
- PATCH /example Receives a AddRequest with a item ID and adds that to the watch list returning the new list
- In the event a user adds the same item ID to the watch list twice the Example will still only contain 1 reference to the item
- Other edge cases are documented in the ExampleControllerTest
- DELETE /example Receives a DeleteRequest with a item ID removes said ID from a users watch list and returns the new list
- In the event the item ID removed is not in the watch list Example will be returned unchanged
- Other edge cases are documented in the ExampleControllerTest