Skip to content

Video-Store-Api: Ting-Yi & Gessica #16

Open
GeMath18 wants to merge 48 commits intoAda-C14:masterfrom
GeMath18:master
Open

Video-Store-Api: Ting-Yi & Gessica #16
GeMath18 wants to merge 48 commits intoAda-C14:masterfrom
GeMath18:master

Conversation

@GeMath18
Copy link

@GeMath18 GeMath18 commented Dec 3, 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 checked the seed data to verify the fields required and validations for videos and customers. We also went over the Readme and checked that Wave 2 made reference to rentals and then we created the relationships among rental, customer and videos. Created the proper models and migrations.
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 that the Time Complexity for customers and videos is log(n) because we have a find_by method that searches for the item in the data base.
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 that the time complexity for POST /rentals/check-in is log(n) because we have a find_by method that searches for the item in the data base.
Describe a specific set of positive and negative test cases you implemented for a model. A positive case is for example on video, when it has all the required fields. A negative test case is for example on video model when we set up a new video to be nil. Then all the fields are missing and can not create a video.
Describe a specific set of positive and negative test cases you implemented for a controller. A positive case is for example when it can renders a 200 code that a check in was successfully done. A negative case is for example when it will respond with "not found" if there is an invalid rental.
Broadly, describe how an API should respond when it handles a request with invalid/erroneous parameters. If there is invalid parameters, it will respond with a "not found". If there is an erroneous parameters, it will respond with a bad request .
Describe one of your custom model methods and why you chose to wrap that functionality into a method. Because we wanted to dry our controller methods, we created a custom model method. For example, checkin_update, we wanted to reflect how the available inventory increases and decreases in videos_checked_out_count.

GeMath18 and others added 30 commits December 1, 2020 18:21
Rentals checkout (passed smoke tests)
fixed the response of release_date format on video show
added tests for rental validations and custom methods, removed the redundant comments
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