Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
A Ruby Gem for FatSecret API
Ruby
branch: master

Merge pull request #6 from uhlenbrock/master

Added specs, and authenticated profile methods.
latest commit 4335685e41
@whistler authored
Failed to load latest commit information.
lib
spec Add support for exercise_entry.edit
.gitignore
.rspec
Gemfile Start adding specs
Gemfile.lock
README.md
Rakefile
fatsecret.gemspec

README.md

FatSecret Gem

Introduction

Access nutritional information from FatSecret. You need to register with FatSecret to get a key and secret. At the moment you can search for food and get its nutritional information, however FatSecret provides much more then that, which has not been implemented in this gem.

Installation

If you are using bundler, you put this in your Gemfile:

source :rubygems
gem 'fatsecret-api'

Then run bundle install

Useage

To use it tell the gem your authentication details:

require 'fatsecret'
FatSecret.init(FATSECRET_KEY,FATSECRET_SECRET)

Search for food, use the following:

FatSecret.search_food('milk')

To get nutritional information for food you found through food search, you have to provide the food method with the food id:

FatSecret.food(800)

Search for Recipe:

FatSecret.search_recipes('chicken',50)

Get a particular recipe if you know its id:

FatSecret.recipe(84411)

CONTRIBUTIONS

Any contributions to improve this gem are welcome.

Something went wrong with that request. Please try again.