Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pipes | tanisha | api muncher #43

Open
wants to merge 79 commits into
base: master
Choose a base branch
from
Open

pipes | tanisha | api muncher #43

wants to merge 79 commits into from

Conversation

tanham
Copy link

@tanham tanham commented Nov 7, 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 scanned to the documentation to search for how to make api calls and began to make calls using postman and then httparty to understand the way Edamam's API worked.
Describe your API Wrapper. How did you decide on the methods you created? I have 2 public public methods (list_recipes and show_recipe) that serve as the main functionality for the site. I have a helper method that parses the recipe for the hash that is returned from the api call and makes it accessible to both of my main method. I also have a check_status method that raises an error if there is no response.
Describe an edge case or failure case test you wrote for your API Wrapper. I have a test that makes sure an APIError is returned if a bad token is given during the API call.
Explain how VCR aids in testing an API. VCR recorded HTTP requests to the Edamam API and allowed me to replay that interaction as often as I needed for testing so that I would not have to use real api calls.
What is the Heroku URL of your deployed application? https://tanham-api-muncher.herokuapp.com/

@PilgrimMemoirs
Copy link

API Muncher

What We're Looking For

Feature Feedback
Core Requirements
Git hygiene Well Done
Comprehension questions Well Done
General
Rails fundamentals (RESTful routing, use of named paths) Well Done
Semantic HTML Mostly Good - missing header around h1
Errors are reported to the user Not complete - no flash messages are shown
API Wrapper to handle the API requests Well Done
Controller testing Not Complete
Lib testing Well Done - (tests: 7 tests, 25 assertions, 0 failures, 0 errors, 0 skips)
Search Functionality Needs Improvement - see note on 'Getting Search Query from form to API call' below
List Functionality Well Done
Show individual item functionality (link to original recipe opens in new tab)
Styling
Foundation Styling for responsive layout Some Improvement - list does not adjust on smaller screen size, would like to see more complex layout for show page.
List View shows 10 items at a time/pagination Not Complete
The app is styled to create an attractive user interface Mostly Good - would like to see more done with show page.
API Features
The App attributes Edamam Well Done
The VCR cassettes do not contain the API key Well Done
External Resources
Link to deployed app on Heroku Needs Improvement - It is throwing an error
Overall
Getting Search Query from form to API call Not working, when I put binding.pry in the self.list_recipes method (after the HTTParty call to the API), the variable search_term was showing up as nil. When I saw that I knew the search term was not being passed into the method call correctly. My second step was to put binding.pry into the controller method, recipes#index, after the call to the list_recipes method. In pry, I entered 'params' to make sure the search I entered in the form was making it into the params hash - here's what I was returned: {"utf8"=>"✓", "searchbar"=>"cheese", "commit"=>"Search", "controller"=>"recipes", "action"=>"index"} - notice my term 'cheese' is being stored under the key 'searchbar', not 'query'. When calling @recipes = EdamamApiWrapper.list_recipes(params[:query]), it should be @recipes = EdamamApiWrapper.list_recipes(params[:searchbar]) instead. It is set to that key, because of how you setup the form.
Areas for Improvement Debugging, Controller Testing, Displaying flash messages
This submission does not meet project expectations.

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