Skip to content

Conversation

@njch5
Copy link

@njch5 njch5 commented Nov 8, 2019

Video Store API

Congratulations! You're submitting your assignment!
If you didn't get to the functionality the question is asking about, reply with what you would have done if you had completed it.

Comprehension Questions

Question Answer
Explain how you came up with the design of your ERD, based on the seed data. We looked through both the customers and movies seed data and was able to determine the relationship, model attributes, and custom model methods.
What would be the Big-O time complexity of your /customers & /movies endpoints? What does the time complexity depend on? Explain your reasoning. O(n) n being the size of the customers or movies.
What is the Big-O time complexity of the POST /rentals/check-in endpoint? What does the time complexity depend on? Explain your reasoning. O(n) depending on how many rentals we have and the movie and customer ID parameters.
Describe a set of positive and negative test cases you implemented for a model. For the Movie model, we created tests for the check_inventory custom method to see if there are enough available inventory if it's greater than 0. If less than 1, we return false.
Describe a set of positive and negative test cases you implemented for a controller. For the Movies controller, we created a positive test case for successfully creating a movie. A negative test case we wrote for the same controller was to return a bad_request status if given invalid params.
How does your API respond when bad data is sent to it? We return either bad_request or not_found depending on the endpoint or controller action.
Describe one of your custom model methods and why you chose to wrap that functionality into a method. We created an increase_inventory custom method in the Movie model which we separated from the controller due to the business logic attached to it.
Do you have any recommendations on how we could improve this project for the next cohort? It would be more clear to provide more details on the check_in endpoint because it is unclear how we will be able to retrieve a specific rental if an ID is not provided in the route/endpoint.
Link to Trello https://trello.com/b/H2LyhaEh/videostoreapi
Link to ERD https://i.imgur.com/RXXYJGc.jpg
Summary This was a good experience! We really enjoyed working on this project together! :)

njch5 and others added 30 commits November 5, 2019 11:55
@jmaddox19
Copy link

Video Store

What We're Looking For

Feature Feedback
Core Requirements
Git hygiene great!
Comprehension questions yup
General
Business Logic in Models yes! so good!
All required endpoints return expected JSON data yes
Requests respond with appropriate HTTP Status Code yes
Errors are reported yup! At least for the checkin edge case I tested
Testing
Passes all Smoke Tests yup!
Model Tests - all relations, validations, and custom functions test positive & negative cases great!
Controller Tests - URI parameters and data in the request body have positive & negative cases great!
Overall Great job! Your code looks so good and your tests are very thorough! Wow! You built your own API! So awesome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants