Skip to content

Ringo & Mona, video-store-api#20

Open
MonaRahmani wants to merge 44 commits intoAda-C14:masterfrom
MonaRahmani:master
Open

Ringo & Mona, video-store-api#20
MonaRahmani wants to merge 44 commits intoAda-C14:masterfrom
MonaRahmani:master

Conversation

@MonaRahmani
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 First we read the requirement and seed data. Then we created a diagram and wrote all the relationships between video, customers, and rentals and the attributes for each model.
What would be the Big-O time complexity of your /customers & /videos endpoints? What does the time complexity depend on? Explain your reasoning. We think it would be O(n) because the entire customer and videos list have to be rendered. The time to render the list will increase linearly to the number of customers/videos increasing.
What is the Big-O time complexity of the POST /rentals/check-in endpoint? What does the time complexity depend on? Explain your reasoning. We think it would be O(1) because it is using customer and video id to find the related rental instance. It will always look up and return one rental.
Describe a specific set of positive and negative test cases you implemented for a model. Positive test: video or customer can be created when it has all the required fields. Negative: video or customer won't be created if data is missing(nil).
Describe a specific set of positive and negative test cases you implemented for a controller. Positive: return rental information for a valid request Negative: return 404 for nonexistent customer
Broadly, describe how an API should respond when it handles a request with invalid/erroneous parameters. It should respond with the response code and return a specific error message. Users should know what went wrong and what they should change.
Describe one of your custom model methods and why you chose to wrap that functionality into a method. Due_date is a custom rental model method that calculates and assigns the rental’s due date. We put this functionality in the model because it creates an attribute for an instance of the model and so should be kept with that model. Also, if the business logic changes (for example, if the store wants to do a shorter rental period for new releases), that logic is contained in one specific method and will be easy to locate and change.

MonaRahmani and others added 30 commits November 30, 2020 21:16
pull in customer index method from origin
added tests for customer model
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

Comments