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 - Kate Evans-Spitzer - API Muncher #21

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

Conversation

Guribot
Copy link

@Guribot Guribot commented Nov 6, 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 spent a long time using a combination of HTTParty in Pry and Postman just to understand the fundamentals of what the requests and responses looked like - especially using Pry/HTTParty to figure out how to access specific data within the JSON response.
Describe your API Wrapper. How did you decide on the methods you created? My main goal was to create methods that, as a user, I would intuitively use - for instance, coming from Rails MVC conventions, my instinct was to use .find(:id) to find an individual recipe. After creating the two basic query methods (#search and #find), I created a few private helper methods to either DRY out code or to separate out more complicated actions, such as determining if there were more recipes after a set search range.
Describe an edge case or failure case test you wrote for your API Wrapper. Testing for various inputs (found or unfound), testing with or without authentication, and testing with and without optional search parameters
Explain how VCR aids in testing an API. By recording a single response, it allows the test to work with an actual response without having to query the API every single time. Querying the API with every test would put additional load on the API/query limits, but would also cause all tests to be dependent on the API functioning at a given moment.
What is the Heroku URL of your deployed application? http://kes-muncher.herokuapp.com/

@droberts-sea
Copy link

API Muncher

What We're Looking For

Feature Feedback
Core Requirements
Git hygiene yes
Comprehension questions yes
General
Rails fundamentals (RESTful routing, use of named paths) yes
Semantic HTML yes
Errors are reported to the user yes
API Wrapper to handle the API requests yes
Controller testing yes
Lib testing yes - good work!
Search Functionality yes
List Functionality yes
Show individual item functionality (link to original recipe opens in new tab) yes
Styling
Foundation Styling for responsive layout yes
List View shows 10 items at a time/pagination yes
The app is styled to create an attractive user interface yes
API Features
The App attributes Edaman yes
The VCR casettes do not contain the API key yes
External Resources
Link to deployed app on Heroku yes
Overall Excellent job overall! This site is attractive and responsive, easy to navigate and well-tested. Keep up the hard work!


begin
return nil if response.empty?
rescue; end

Choose a reason for hiding this comment

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

This begin/rescue has me confused - it doesn't look like anything here will throw an error. Also, you should always be rescuing a particular error, to prevent yourself from accidentally rescuing programming errors.

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