Skip to content

Conversation

@mheshmati-tech
Copy link

Assignment Submission: Video Store API

Congratulations! You're submitting your assignment. Please reflect on the assignment with these questions.

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.

Reflection

Prompt Response
Explain how you came up with the initial design of your ERD, based on the seed data and reading through the API endpoints Looking through the requirements, we determined that the relationship between video and rentals is one to many and customer to rentals one to many- thus rentals is the intermediate of the two having one(zero) to many relationship.
What would be the Big-O time complexity of your /customers & /videos endpoints? What does the time complexity depend on? Explain your reasoning. O(n), since they both depend on the amount of videos and customers present and need to iterate through everyone of them individually.
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) since we use .find_by to find the customer and the video.
Describe a specific set of positive and negative test cases you implemented for a model. N/A
Describe a specific set of positive and negative test cases you implemented for a controller. testing the destroy action when there are no customers/videos present, show action when there are no customers/videos available.
Broadly, describe how an API should respond when it handles a request with invalid/erroneous parameters. it will respond with a 4xx code to indicate a not found, or bad request error message.
Describe one of your custom model methods and why you chose to wrap that functionality into a method. increasing and decreasing the checked in and checked out count for customer and increasing and decrease available inventory for videos when the check in or checked out method is called.

mheshmati-tech and others added 22 commits May 27, 2020 14:20
…empting to create new rental/check in rental.
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.

2 participants