Skip to content

Fire/ Earth: Ayesha/ Beauttie - video-store-api project submission#35

Open
ayaseef wants to merge 20 commits intoAda-C14:masterfrom
ayaseef:master
Open

Fire/ Earth: Ayesha/ Beauttie - video-store-api project submission#35
ayaseef wants to merge 20 commits intoAda-C14:masterfrom
ayaseef:master

Conversation

@ayaseef
Copy link

@ayaseef ayaseef commented Dec 4, 2020

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 utilized the wiki page for the project and the given params/ or the attributes for each controller. We noticed the connection between the videos and the customers through the rental endpoints.
What would be the Big-O time complexity of your /customers & /videos endpoints? What does the time complexity depend on? Explain your reasoning. This time complexity depends on the length of our ActiveRecord collections, so the Big-O of our endpoints will be O(n).
What is the Big-O time complexity of the POST /rentals/check-in endpoint? What does the time complexity depend on? Explain your reasoning. This time complexity of our solution is O(1) because our rentals are indexed by customer_id and video_id and finding by those attributes is constant in time (find_by would be O(n) if our rows were not indexed because we would then need to iterate over the rows of our db to find the Rental instance).
Describe a specific set of positive and negative test cases you implemented for a model. We tested for valid customers and invalid customer IDs. We also tested for each single validation from every model/ business logic.
Describe a specific set of positive and negative test cases you implemented for a controller. Positive: we can check out a valid video to a valid customer. Negatives: we cannot check out if a customer or video does not exist in our db and if the video is not available in our inventory.
Broadly, describe how an API should respond when it handles a request with invalid/erroneous parameters. The API can respond with a status of 404: NOT FOUND or 500: Internal Server Error etc.
Describe one of your custom model methods and why you chose to wrap that functionality into a method. Check-in and Check-out rentals are the two methods that we have in our Model custom methods. We chose to have them in model methods because they are business logic functionality.

beauttie and others added 20 commits December 1, 2020 15:33
* Initial rails api setup, created customer controller  migration

* Added video count attribute to the customer migration

* Added index action for the customer controller

* Deleted the videos yml file
Added videos create controller action and passed tests
…eck out and in actions in Rentals controller to pass smoke tests
Copy link

@dHelmgren dHelmgren left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 ✔️
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

Comments