Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Simple wrapper for ESHA nutrition database api (http://developer.esha.com/)
Branch: master
Pull request Compare This branch is 1 commit behind balvig:master.

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
spec
.gitignore
.rspec
Gemfile
LICENSE
README.md
Rakefile
esha.gemspec

README.md

Esha

Esha is a simple wrapper that makes the ESHA nutrition api a little easier to work with.

Installation

Add this line to your application's Gemfile:

gem 'esha'

And then run:

$ bundle

Or install it yourself:

$ gem install esha

Usage

Esha::Api.key = '....' # Get an api key from http://developer.esha.com/

pizza = Esha::Food.search('pizza').first
pizza.description # => 'Pizza, hand tossed, cheese, 12"'
pizza.product # => "Domino's Pizza"
pizza.nutrients.first.summary # => "1 Piece -> 187.255 kcal Calories"
Something went wrong with that request. Please try again.