README.md

yummlyr

Build Status AppVeyor Build Status Coverage Status CRAN_Status_Badge

R package with bindings for Yummly API

NOTE: Neither this package or its author is affiliated Yummly.

Installation

To install the release version of yummlyr from CRAN:

install.packages('yummlyr')

To get the development version from Github:

devtools::intstall_github("RomanTsegelskyi/yummlyr")

Usage

First of all, obtain API credentials from Yummly.com. After that you can use save_yummly_credentials() to persist the application ID and application key between queries, or supply them directly to search_recipes() and get_recipe() functions.

Search Recipes

search_recipes() function corresponds to Search Recipes API call and is used to search for recipes fitting certain criterias. Example search response. The simplest call looks like this:

search_recipes('bacon')

YummlyR supports wide variety of criteria:

For example,

search_recipes("onion soup", allowed_ingredient = "bacon")

will return onion soup recipes that contain bacon. More detailed expanations of Yummly's Search API with example can be found here.

Note that allowed values for ingeredient, diet, allergy, cuisine, course, holiday, nutrition and flavor are defined by Yummly.com metadata and saved inside the package for convenience. Available metadata can be accessed with get_metadata():

get_metadata('holiday')

This returns a data.frame with information about available holiday keywords.

Get Recipe

Fetch a recipe by its ID. Example recipe response. For example:

get_recipe("French-Onion-Soup-The-Pioneer-Woman-Cooks-_-Ree-Drummond-41364")

This returns detailed information about French Onion Soup French Onion Soup.



RomanTsegelskyi/yummlyr documentation built on May 9, 2019, 10:31 a.m.