get_recipe: Get the recipes.

Description Usage Arguments Value Examples

View source: R/get_recipe.R

Description

This functions gets the recipes with specified requirements.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
get_recipe(
  key = NULL,
  query = NULL,
  cuisine = NULL,
  diet = NULL,
  exclude = NULL,
  intolerance = NULL,
  number = 10,
  instruction = NULL,
  maxReadyTime = NULL,
  minCalories = NULL,
  maxCalories = NULL,
  minCarbs = NULL,
  maxCarbs = NULL,
  minProtein = NULL,
  maxProtein = NULL,
  minFat = NULL,
  maxFat = NULL,
  minAlcohol = NULL,
  maxAlcohol = NULL,
  minCaffeine = NULL,
  maxCaffeine = NULL,
  minSaturatedFat = NULL,
  maxSaturatedFat = NULL
)

Arguments

key

API key

query

The (natural language) recipe search query.

cuisine

The cuisine(s) of the recipes. One or more, comma separated (will be interpreted as 'OR')

diet

The diet for which the recipes must be suitable.

exclude

A comma-separated list of ingredients or ingredient types that the recipes must not contain.

intolerance

A comma-separated list of intolerances. All recipes returned must not contain ingredients that are not suitable for people with the intolerances entered.

number

The number of expected results (between 1 and 10).

instruction

Whether the recipes must have instructions.

maxReadyTime

The maximum time in minutes it should take to prepare and cook the recipe.

minCalories

The minimum amount of calories the recipes must have.

maxCalories

The maximum amount of calories the recipes can have.

minCarbs

The minimum amount of carbohydrates in grams the recipes must have.

maxCarbs

The maximum amount of carbohydrates in grams the recipes can have.

minProtein

The minimum amount of protein in grams the recipes must have.

maxProtein

The maximum amount of protein in grams the recipes can have.

minFat

The minimum amount of fat in grams the mrecipes must have.

maxFat

The maximum amount of fat in grams the recipes can have.

minAlcohol

The minimum amount of alcohol in grams the recipe must have.

maxAlcohol

The maximum amount of alcohol in grams the recipe can have.

minCaffeine

The minimum amount of caffeine in milligrams the recipe must have.

maxCaffeine

The maximum amount of caffeine in milligrams the recipe can have.

minSaturatedFat

The minimum amount of saturated fat in grams the recipe must have.

maxSaturatedFat

The maximum amount of saturated fat in grams the recipe can have.

Value

The recipes requested by users.

Examples

1
get_recipe(key = Sys.getenv("SPOON_KEY"), query = "pork" ,number = 10)

cynthiawang315/SpoonacularAPI documentation built on Feb. 18, 2020, 12:28 a.m.