Skip to content

Space Hala and Chelsea#8

Open
ChelseaC13 wants to merge 16 commits intoAda-C13:masterfrom
ChelseaC13:master
Open

Space Hala and Chelsea#8
ChelseaC13 wants to merge 16 commits intoAda-C13:masterfrom
ChelseaC13:master

Conversation

@ChelseaC13
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 We stuck to the wiki page explanation, decided what connections we needed. We made a graph and worked from there. In the end, rental has one video and one customer. While videos have many rentals and customers have many rentals.
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 all the get methods are O(n) because they have a find_by or have to print out the whole list. while the post methods are O(1) because they are only concerned with the one entry.
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) because the function needs to go through all the rentals to find the one to check-in.
Describe a specific set of positive and negative test cases you implemented for a model. For customer model test we have a test to check that it is valid when all fields are present, and ones to check if it is invalid if any required field is not there.
Describe a specific set of positive and negative test cases you implemented for a controller. In rental controller test it will respond with a bad request for invalid data like customer_id but will respond with ok if all fields are present.
Broadly, describe how an API should respond when it handles a request with invalid/erroneous parameters. It responds with an appropriate status code example: ok: 200.
Describe one of your custom model methods and why you chose to wrap that functionality into a method. Our "add to count" method handles increasing the checkout video count and decreasing the number of available copies. We decided to put that function there because it is business logic that could be used in other places.

@dHelmgren
Copy link

Video Store API

Major Learning Goals/Code Review

Criteria yes/no, and optionally any details/lines of code to reference
Practices git with at least 10 small commits and meaningful commit messages ✔️
Understands the importance of how APIs handle invalid/erroneous data in their reflection questions The opposite, actually! If the element is wrong and interferes with the ability to run the route, it should spit out appropriate errors.
Practices Rails best practices and well-designed separation, and encapsulates business logic around check-out and check-in in models ✔️
Uses controller tests to ensure quality code for every route, and checks for response status and content, with positive cases and negative cases ✔️
Uses controller tests to ensure correctness for check out and check in requirement, and that checked out counts and inventories appropriately change ✔️

Functional Requirements

Functional Requirement yes/no
All provided smoke tests for Wave 1 pass ✔️
All provided smoke tests for Wave 2 pass ✔️

Overall Feedback

Overall Feedback Criteria yes/no
Green (Meets/Exceeds Standards) 3+ in Code Review && 2 in Functional Requirements ✔️
Yellow (Approaches Standards) 2+ in Code Review && 1+ in Functional Requirements, or the instructor judges that this project needs special attention
Red (Not at Standard) 0-1 in Code Review or 0 in Functional Reqs, or assignment is breaking/doesn’t run with less than 5 minutes of debugging, or the instructor judges that this project needs special attention

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