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

Danielle Metzner - API Muncher #23

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

Conversation

danimetz
Copy link

@danimetz danimetz commented Nov 5, 2018

API Muncher

Congratulations! You're submitting your assignment!

Comprehension Questions

Question Answer
How did you go about exploring the Edamam API, and how did you try querying the API? First I read the documentation and then I began to test requests with Postman to see what the JSON output was so I could write my API wrapper accordingly.
What is an API Wrapper? Why is it in lib? How would your project change if you needed to interact with more than one API (aka more than just the Edamam API)? An API Wrapper is a way for our rails application to parse the data from the API and return it in a format that we desire. It is in the lib folder because it is a custom library. We could have another file in our lib folder for the other API that we were using.
Describe your API wrapper, the methods you created in it, and why you decided to create those methods/how they were helpful I created a recipe_list to list all the recipes that include the word that was searched. I also created a find_recipe based off the ID. Then I also created self.create_recipe(api_params) to pass in the api params to create a new class recipe.
What was an edge case or failure case test you wrote for your API Wrapper? What was a nominal case? I tested for bad data, or no data. Nominal case was "chicken" or something that has recipes
How does VCR aid in testing an API? It records the specific cases that we run so that when we do the same request over and over it knows the response instead of going back to the web API to make the request.
What is the Heroku URL of your deployed application? https://recipe-muncher-dani.herokuapp.com/

@CheezItMan
Copy link

API Muncher

What We're Looking For

Feature Feedback
Core Requirements
Git hygiene Good number of commits and good commit messages
Comprehension questions Check
General
Rails fundamentals (RESTful routing, use of named paths) Check
Semantic HTML You are overusing div elements a bit.
Errors are reported to the user If the id is wrong the app just says you are being redirected.
API Wrapper to handle the API requests Check
Controller testing No test for the root_path
Lib testing You didn't test the find_recipe recipe with an invalid id.
Search Functionality Check
List Functionality Check
Show individual item functionality Check
Styling
List view shows 10 items at a time and/or has pagination Check
Attractive and usable UI Looks good on a PC, not so nice on a mobile phone.
API Features
The App attributes Edamam Check
The VCR cassettes do not contain the API key Check
External Resources
Link to deployed app on Heroku Check
Overall Nice work, you hit the major learning goals Check your testing a bit, you need to be a bit more through about it.


data = HTTParty.get(url)

if data.empty?

Choose a reason for hiding this comment

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

This won't work and causes the crash when the site is given an invalid id.

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