Skip to content

Conversation

@SaraChandler
Copy link

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 read the API docs and tried searching with postman.
Describe your API Wrapper. How did you decide on the methods you created? My wrapper has two methods. I knew we would need to return a list of recipes for the index page, so I made a method that would return an array of recipe objects. My second method takes the URI data from a recipe object and returns the recipe so it can be viewed in the show page.
Describe an edge case or failure case test you wrote for your API Wrapper. If the search returns no results, the wrapper will return an empty array.
Explain how VCR aids in testing an API. VCR is used to reduce dependency on APIs when testing. With it we can record HTTP interactions and replay them when needed, so we don't have to make those calls to the API every time we want to run a test.
What is the Heroku URL of your deployed application? https://guarded-waters-62053.herokuapp.com/

@CheezItMan
Copy link

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 Check
Errors are reported to the user Check for no results on a search, but if I give it an invalid recipe URI the page crashes.
API Wrapper to handle the API requests Check
Controller testing Yes, but you commented out an important negative-case test. See my in-code comments.
Lib testing Check, but again no negative-case testing.
Search Functionality Check
List Functionality Check
Show individual item functionality (link to original recipe opens in new tab) The link is there, but it doesn't open in a new tab.
Styling
Foundation Styling for responsive layout Check, well done
List View shows 10 items at a time/pagination Chekc
The app is styled to create an attractive user interface the interface is ok, but the cat image pushes the search bar very far down and the show layout is pretty basic.
API Features
The App attributes Edaman The attribution is there, but not linking back to Edamam
The VCR casettes do not contain the API key Check
External Resources
Link to deployed app on Heroku Check, well done
Overall You hit the requirements, but missed some negative-case testing and your styling was rather basic. Overall, not bad.

<% @results_page.each do |recipe| %>
<article class="results_list column float-left large-4 medium-6 small-12">
<li>
<%= image_tag recipe.image, alt: "foods" %>

Choose a reason for hiding this comment

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

It would make sense for this image to be a link to the recipe too!

end
end

def self.show_recipe(uri)

Choose a reason for hiding this comment

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

Some error detection here should be done, what if response[0] is nil?

end
end

describe "show_recipe" do

Choose a reason for hiding this comment

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

What about negative case tests? What if the item put in the URL is wrong?

end
end

# it "will render 404 if recipe isn't found" do

Choose a reason for hiding this comment

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

Good that you thought of it, this test exposes a problem with your wrapper.

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