Skip to content

Jasmine and Stacy's VideoAPI#22

Open
StacyLundquist wants to merge 60 commits intoAda-C14:masterfrom
StacyLundquist:master
Open

Jasmine and Stacy's VideoAPI#22
StacyLundquist wants to merge 60 commits intoAda-C14:masterfrom
StacyLundquist:master

Conversation

@StacyLundquist
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 The seed data provided us with the two primary models as well as the attributes; the endpoints solidified the idea that customers and videos would be the direct models and rentals would be indirect.
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) because the items for both are contained in arrays, so the find_by must iterate over each element.
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) -- the complexity depends on .find_by method that is being run.
Describe a specific set of positive and negative test cases you implemented for a model. Using the video model as an example -- Positive: all of the correct validations were given, so the test should (and does) pass. Negative: one of the validations was incorrect, so the video shouldn't be valid.
Describe a specific set of positive and negative test cases you implemented for a controller. Using checkout as an example -- Positive: the test returns success given all valid params; Negative: if given an invalid customer or video id the test returns not found.
Broadly, describe how an API should respond when it handles a request with invalid/erroneous parameters. The response should be :not_found (in JSON) or should throw invalidation errors.
Describe one of your custom model methods and why you chose to wrap that functionality into a method. We used check-in/check-out for our custom methods to make the code cleaner. A lot of it was business logic, making it easier to DRY up the code by implementing it in the model.

jasyl and others added 30 commits December 2, 2020 22:45
updated checkin and added ordering to video and customer
fixed syntax & empty expectations
updated rentals checkout with model method
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