knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
devtools::load_all(".")
This SpoonacularAPI package contains functions that allow users to get information about recipes and menu items that are available on Spoonacular.
get_recipe()
gives users the names and ids of the recipes based on the parameters they entered into this function in the form of a dataframe. The description of the parameters is listed in the documentation page.SpoonacularAPI::get_recipe(key = Sys.getenv("SPOON_KEY"), query = "beef" ,number = 10)
get_recipe_information()
takes one or more recipe ids returned by get_recipe()
and returns the information of the recipes in a dataframe. The output includes instructions, links to the recipes, health scores, cuisines, dish types, etc.SpoonacularAPI::get_recipe_information(key = Sys.getenv("SPOON_KEY"), recipe_ids = "509163,825127,600427")
get_recipe_equipment()
takes one recipe id returned by get_recipe()
and returns the equipment required by the recipe in a dataframe.SpoonacularAPI::get_recipe_equipment(key = Sys.getenv("SPOON_KEY"), recipe_id = "753644")
get_recipe_ingredient()
takes one recipe id returned by get_recipe()
and returns the ingredients required by the recipe and amount of ingredients needed in a dataframe. SpoonacularAPI::get_recipe_ingredient(key = Sys.getenv("SPOON_KEY"), recipe_id = "753644")
get_recipe_nutrition()
takes one recipe id returned by get_recipe()
and returns the basic nutritional values, bad nutrients, and good nutrients of the recipe in three dataframes. SpoonacularAPI::get_recipe_nutrition(key = Sys.getenv("SPOON_KEY"), recipe_id = "753644")
get_menu()
gives users names and ids of the menu items based on the parameters they entered into this function in the form of a dataframe. The description of the parameters is listed in the documentation page. The output also includes the restaurant chains where the menu items are provided at.SpoonacularAPI::get_menu(key = Sys.getenv("SPOON_KEY"),query = "burger" ,number = 10)
get_menu_info()
takes one menu item id returned by get_menu()
and returns the basic nutritional values of the menu item in a dataframe.SpoonacularAPI::get_menu_info(key = Sys.getenv("SPOON_KEY"), item_id = 419357)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.