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

Carets - Maria McGrew - Api Muncher #34

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

Carets - Maria McGrew - Api Muncher #34

wants to merge 22 commits into from

Conversation

ghost
Copy link

@ghost ghost 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 started by exploring the API documentation on the Edamam site. I then used Postman to enter different GET requests in order to determine what my API wrapper would need in order to get the desired recipe information.
Describe your API Wrapper. How did you decide on the methods you created? I created a method that searched and listed the search results and a method that gets the individual recipe and lists that recipe's details.
Describe an edge case or failure case test you wrote for your API Wrapper. I wrote a test that sends an error if the recipe request is invalid.
Explain how VCR aids in testing an API. It makes a call to the API and then stores the results from that request in a cassette. That cassette is used when doing testing in order to limit the number of API calls.
What is the Heroku URL of your deployed application? https://maria-api-muncher.herokuapp.com/

@CheezItMan
Copy link

CheezItMan commented Nov 7, 2017

API Muncher

What We're Looking For

Feature Feedback
Core Requirements
Git hygiene Good commit messages, but more granular commits would be better.
Comprehension questions Check
General
Rails fundamentals (RESTful routing, use of named paths) Check
Semantic HTML Semantic HTML, but very simple styling
Errors are reported to the user No flash notices
API Wrapper to handle the API requests Check
Controller testing Testing is there, but there are some issues, see my notes in the code.
Lib testing Yes, with some small notes
Search Functionality Working now
List Functionality It works, but not styled
Show individual item functionality (link to original recipe opens in new tab) Unstyled, but it works
Styling
Foundation Styling for responsive layout Nothing
List View shows 10 items at a time/pagination Working now!
The app is styled to create an attractive user interface Nope
API Features
The App attributes Edaman Attribution is there, but not linked to Edaman
The VCR casettes do not contain the API key Check
External Resources
Link to deployed app on Heroku Deployed, but not working.
Overall I understand you were sick and had a hard time getting this in. I appreciate the effort.


response = HTTParty.get(url)
if response
image = URI.encode(response[0]["image"])

Choose a reason for hiding this comment

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

you also need to do:

if response[0]

end
end

it "returns an error if it has a bad request" do

Choose a reason for hiding this comment

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

This test throws an error because of the thing I noted in the wrapper.

end

def index
@recipes = EdamamApiWrapper.list_recipes

Choose a reason for hiding this comment

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

This should take an argument from params!

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.

None yet

2 participants