-
Notifications
You must be signed in to change notification settings - Fork 48
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
UPDATED README #85
base: master
Are you sure you want to change the base?
UPDATED README #85
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jm-rives Not bad work Joanna, you've got the essentials. You're missing the pagination, and you should separate the implementation specific details of the API from the controller by creating a Recipe class that your wrapper returns instead of the direct hash.
puts "*******" + url + "*******" | ||
|
||
# url = BASE_URL + "?q=bacon&from=0&to=10" + "&app_id=#{APP_ID}" + "&app_key=#{APP_KEY}" | ||
|
||
data = HTTParty.get(url) | ||
# return data['hits'][0]['recipe']['label'] | ||
recipes = [] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You might want to put in some checks in for if the API responds with something unexpected, like if 'hits' is null.
I would also probably setup a recipe class and return either a specific recipe or an array of them. That way you would separate the implementation of the Recipe API from it's use. It would let you switch APIs or other sources of the recipes easier.
<footer> | ||
<p class="attribute"> Powered by Edamam |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This footer could be abstracted into the layout or as a partial.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not bad work Joanna, you have the core of it done. Just Foundation work, styling, and pagination left to do. Nice job.
added reflection