Skip to content

Conversation

@RanaSulaiman
Copy link

@RanaSulaiman RanaSulaiman commented May 9, 2017

API Muncher

Congratulations! You're submitting your assignment!

Comprehension Questions

Question Answer
How did you go about exploring the Edamam API, how did you try querying the API? I first explored API documentation to become familiar with the requests that user can make. Then tried these requests in postman to explore API response in order to know which data I need to read and display to the client
Describe your API Wrapper. How did you decide on the methods you created? Based on project requirements, I decided that I needed two self methods. The first method is to list the recipes that match user search input and this method return recipe objects that have all information related to recipes. The second method is to show all information for a specific recipe which will render in a new view page
Describe an edge case or failure case test you wrote for your API Wrappg an API. I have a test case that tests user will get flash message if there is no search match weather the user hits search button without specifying an ingredient or the item is not found in the HTTParty response.
What is the Heroku URL of your deployed application? https://frozen-basin-30752.herokuapp.com/
Explain how VCR aids in testing an API. We use VCR testing to record HTTP responses into a cassette which will be used again if we call the same HTTP request in our test. If we used a new HTTP response in our test, the VCR will call a new HTTP and save it also in the cassette.
Do you have any recommendations on how we could improve this project for the next cohort? A heads up of some pitfalls of Heroku deployment would be very helpful. I spent quite a time in fixing my deployment as a result of not requiring recipe class in the wrapper file . I also updated the production file to allow static assets inorder to show my background image.

and 'webmock gems
@kariabancroft
Copy link

API Muncher

What We're Looking For

Feature Feedback
Core Requirements
Git hygiene Looks good
Comprehension questions Yes
General
Rails fundamentals (RESTful routing, use of named paths) Good - watch your indentation
Semantic HTML Yes - In your application.html watch out for opening/closing HTML tags outside/inside of rails form helpers. (lines 25-28)
Errors are reported to the user No. You check to make sure that "hits" exists, but what about if it doesn't exist? You don't have an else
API Wrapper to handle the API requests Yes. Memoizing constants into local variables isn't going to buy you any optimization.
Controller testing Some - what about a test if the URI for the recipe is not good?
Styling
Foundation Styling for responsive layout Yes - I like the look & feel with the splash page
Search View Yes - I like the placeholder text
List View You have the same conditional twice which is unnecessary. You could put the second div within the first conditional.
Show View which opens in a new tab You did a nice job creating the different sections and using foundation. The iteration you use for the dietary info should not be in the view. This logic should aggregate this data somewhere else (possible in the Recipe class or the API wrapper) since this should not be relevant to the way each item is shown in your view.
API Features
The App attributes Edaman Yes
The VCR casettes do not contain the API key It looks like they contain your bad test data rather than the real keys
Overall You did a nice job hitting the major learning goals. You focused on testing the API Wrapper which is great - I'd like to see you think about the failure scenarios from the controller level as well

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