Project

zutat

0.0
No commit activity in last 3 years
No release in over 3 years
Fetch Soylent recipes from diy.soylent.me and get easy-to-use Ruby objects.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0
 Project Readme

zutat

zutat is a small Ruby gem which allows you to simply get and work with recipes from diy.soylent.me. It is is dead-simple and you can easily get Soylent recipes for your project.

FYI: "zutat" is German and means ingredient.

Installation

Just install the gem from RubyGems.

gem install zutat

Usage

At first, you should require the gem. Otherwise it won't work.

require 'zutat'

Initialize a client

Then you must initialize a new client.

client = Zutat::Client.new

Fetch a recipe

At this point, you can get a recipe by its ID. If I want the "People Chow 3.0.1" recipe, I type:

recipe = client.get_recipe "people-chow-301-tortilla-perfection"

Using the recipe object

If I want to know, how many calories are specified as nutrient target I simply use:

puts recipe.nutrient_targets.calories

Or when I want to know the source (to buy) for each ingredient in this recipe:

recipe.ingredients.each do |ingredient|
  puts ingredient.source
end

TODO

  • Adding index with all objects
  • Adding search feature
  • Optimizing attributes from Zutat::Ingredients and Zutat::NutrientTargets

Support

If you like my work, you can support me via Gratipay, Flattr or a Bitcoin donation:

Support via Gittip

Flattr this git repo

1n5cZr1h3kVxt9gChCBueb1J5feL8RgZZ