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

UPDATED README #85

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

UPDATED README #85

wants to merge 27 commits into from

Conversation

jm-rives
Copy link

@jm-rives jm-rives commented Nov 7, 2016

added reflection

Copy link

@CheezItMan CheezItMan left a 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 = []

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

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.

Copy link

@CheezItMan CheezItMan left a 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants