spoonacular_pox
v1.0.1
Published
The_spoonacular_Nutrition_Recipe_and_Food_API_allows_you_to_access_over_380000_recipes_thousands_of_ingredients_800000_food_products_and_100000_menu_items__Our_food_ontology_and_semantic_recipe_search_engine_makes_it_possible_to_search_for_recipes_using_n
Downloads
2
Readme
spoonacular_api
SpoonacularApi - JavaScript client for spoonacular_api The spoonacular Nutrition, Recipe, and Food API allows you to access over 380,000 recipes, thousands of ingredients, 800,000 food products, and 100,000 menu items. Our food ontology and semantic recipe search engine makes it possible to search for recipes using natural language queries, such as "gluten free brownies without sugar" or "low fat vegan cupcakes." You can automatically calculate the nutritional information for any recipe, analyze recipe costs, visualize ingredient lists, find recipes for what's in your fridge, find recipes based on special diets, nutritional requirements, or favorite ingredients, classify recipes into types and cuisines, convert ingredient amounts, or even compute an entire meal plan. With our powerful API, you can create many kinds of food and especially nutrition apps. Special diets/dietary requirements currently available include: vegan, vegetarian, pescetarian, gluten free, grain free, dairy free, high protein, whole 30, low sodium, low carb, Paleo, ketogenic, FODMAP, and Primal. This SDK is automatically generated by the OpenAPI Generator project:
- API version: 1.0
- Package version: 1.0
- Build package: org.openapitools.codegen.languages.JavascriptClientCodegen For more information, please visit https://spoonacular.com/contact
Installation
For Node.js
npm
To publish the library as a npm, please follow the procedure in "Publishing npm packages".
Then install it via:
npm install spoonacular_api --save
Finaly, you need to build the module:
npm run build
Local development
To use the library locally without publishing to a remote npm registry, first install the dependencies by changing into the directory containing package.json
(and this README). Let's call this JAVASCRIPT_CLIENT_DIR
. Then run:
npm install
Next, link it globally in npm with the following, also from JAVASCRIPT_CLIENT_DIR
:
npm link
To use the link you just defined in your project, switch to the directory you want to use your spoonacular_api from, and run:
npm link /path/to/<JAVASCRIPT_CLIENT_DIR>
Finaly, you need to build the module:
npm run build
git
If the library is hosted at a git repository, e.g.https://github.com/GIT_USER_ID/GIT_REPO_ID then install it via:
npm install GIT_USER_ID/GIT_REPO_ID --save
For browser
The library also works in the browser environment via npm and browserify. After following
the above steps with Node.js and installing browserify with npm install -g browserify
,
perform the following (assuming main.js is your entry file):
browserify main.js > bundle.js
Then include bundle.js in the HTML pages.
Webpack Configuration
Using Webpack you may encounter the following error: "Module not found: Error: Cannot resolve module", most certainly you should disable AMD loader. Add/merge the following section to your webpack config:
module: {
rules: [
{
parser: {
amd: false
}
}
]
}
Getting Started
Please follow the installation instruction and execute the following JS code:
var SpoonacularApi = require('spoonacular_api');
var defaultClient = SpoonacularApi.ApiClient.instance;
// Configure API key authorization: apiKeyScheme
var apiKeyScheme = defaultClient.authentications['apiKeyScheme'];
apiKeyScheme.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKeyScheme.apiKeyPrefix['apiKey'] = "Token"
var api = new SpoonacularApi.IngredientsApi()
var opts = {
'query': burger, // {String} The (natural language) search query.
'_number': 10, // {Number} The maximum number of items to return (between 1 and 100). Defaults to 10.
'metaInformation': false, // {Boolean} Whether to return more meta information about the ingredients.
'intolerances': egg // {String} A comma-separated list of intolerances. All recipes returned must not contain ingredients that are not suitable for people with the intolerances entered. See a full list of supported intolerances.
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.autocompleteIngredientSearch(opts, callback);
Documentation for API Endpoints
All URIs are relative to https://api.spoonacular.com
Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- SpoonacularApi.IngredientsApi | autocompleteIngredientSearch | GET /food/ingredients/autocomplete | Autocomplete Ingredient Search SpoonacularApi.IngredientsApi | computeIngredientAmount | GET /food/ingredients/{id}/amount | Compute Ingredient Amount SpoonacularApi.IngredientsApi | getIngredientInformation | GET /food/ingredients/{id}/information | Get Ingredient Information SpoonacularApi.IngredientsApi | getIngredientSubstitutes | GET /food/ingredients/substitutes | Get Ingredient Substitutes SpoonacularApi.IngredientsApi | getIngredientSubstitutesByID | GET /food/ingredients/{id}/substitutes | Get Ingredient Substitutes by ID SpoonacularApi.IngredientsApi | ingredientSearch | GET /food/ingredients/search | Ingredient Search SpoonacularApi.IngredientsApi | ingredientsByIDImage | GET /recipes/{id}/ingredientWidget.png | Ingredients by ID Image SpoonacularApi.IngredientsApi | mapIngredientsToGroceryProducts | POST /food/ingredients/map | Map Ingredients to Grocery Products SpoonacularApi.IngredientsApi | visualizeIngredients | POST /recipes/visualizeIngredients | Ingredients Widget SpoonacularApi.MealPlanningApi | addMealPlanTemplate | POST /mealplanner/{username}/templates | Add Meal Plan Template SpoonacularApi.MealPlanningApi | addToMealPlan | POST /mealplanner/{username}/items | Add to Meal Plan SpoonacularApi.MealPlanningApi | addToShoppingList | POST /mealplanner/{username}/shopping-list/items | Add to Shopping List SpoonacularApi.MealPlanningApi | clearMealPlanDay | DELETE /mealplanner/{username}/day/{date} | Clear Meal Plan Day SpoonacularApi.MealPlanningApi | connectUser | POST /users/connect | Connect User SpoonacularApi.MealPlanningApi | deleteFromMealPlan | DELETE /mealplanner/{username}/items/{id} | Delete from Meal Plan SpoonacularApi.MealPlanningApi | deleteFromShoppingList | DELETE /mealplanner/{username}/shopping-list/items/{id} | Delete from Shopping List SpoonacularApi.MealPlanningApi | deleteMealPlanTemplate | DELETE /mealplanner/{username}/templates/{id} | Delete Meal Plan Template SpoonacularApi.MealPlanningApi | generateMealPlan | GET /mealplanner/generate | Generate Meal Plan SpoonacularApi.MealPlanningApi | generateShoppingList | POST /mealplanner/{username}/shopping-list/{start-date}/{end-date} | Generate Shopping List SpoonacularApi.MealPlanningApi | getMealPlanTemplate | GET /mealplanner/{username}/templates/{id} | Get Meal Plan Template SpoonacularApi.MealPlanningApi | getMealPlanTemplates | GET /mealplanner/{username}/templates | Get Meal Plan Templates SpoonacularApi.MealPlanningApi | getMealPlanWeek | GET /mealplanner/{username}/week/{start-date} | Get Meal Plan Week SpoonacularApi.MealPlanningApi | getShoppingList | GET /mealplanner/{username}/shopping-list | Get Shopping List SpoonacularApi.MenuItemsApi | autocompleteMenuItemSearch | GET /food/menuItems/suggest | Autocomplete Menu Item Search SpoonacularApi.MenuItemsApi | getMenuItemInformation | GET /food/menuItems/{id} | Get Menu Item Information SpoonacularApi.MenuItemsApi | menuItemNutritionByIDImage | GET /food/menuItems/{id}/nutritionWidget.png | Menu Item Nutrition by ID Image SpoonacularApi.MenuItemsApi | menuItemNutritionLabelImage | GET /food/menuItems/{id}/nutritionLabel.png | Menu Item Nutrition Label Image SpoonacularApi.MenuItemsApi | menuItemNutritionLabelWidget | GET /food/menuItems/{id}/nutritionLabel | Menu Item Nutrition Label Widget SpoonacularApi.MenuItemsApi | searchMenuItems | GET /food/menuItems/search | Search Menu Items SpoonacularApi.MenuItemsApi | visualizeMenuItemNutritionByID | GET /food/menuItems/{id}/nutritionWidget | Menu Item Nutrition by ID Widget SpoonacularApi.MiscApi | detectFoodInText | POST /food/detect | Detect Food in Text SpoonacularApi.MiscApi | getARandomFoodJoke | GET /food/jokes/random | Random Food Joke SpoonacularApi.MiscApi | getConversationSuggests | GET /food/converse/suggest | Conversation Suggests SpoonacularApi.MiscApi | getRandomFoodTrivia | GET /food/trivia/random | Random Food Trivia SpoonacularApi.MiscApi | imageAnalysisByURL | GET /food/images/analyze | Image Analysis by URL SpoonacularApi.MiscApi | imageClassificationByURL | GET /food/images/classify | Image Classification by URL SpoonacularApi.MiscApi | searchAllFood | GET /food/search | Search All Food SpoonacularApi.MiscApi | searchCustomFoods | GET /food/customFoods/search | Search Custom Foods SpoonacularApi.MiscApi | searchFoodVideos | GET /food/videos/search | Search Food Videos SpoonacularApi.MiscApi | searchSiteContent | GET /food/site/search | Search Site Content SpoonacularApi.MiscApi | talkToChatbot | GET /food/converse | Talk to Chatbot SpoonacularApi.ProductsApi | autocompleteProductSearch | GET /food/products/suggest | Autocomplete Product Search SpoonacularApi.ProductsApi | classifyGroceryProduct | POST /food/products/classify | Classify Grocery Product SpoonacularApi.ProductsApi | classifyGroceryProductBulk | POST /food/products/classifyBatch | Classify Grocery Product Bulk SpoonacularApi.ProductsApi | getComparableProducts | GET /food/products/upc/{upc}/comparable | Get Comparable Products SpoonacularApi.ProductsApi | getProductInformation | GET /food/products/{id} | Get Product Information SpoonacularApi.ProductsApi | productNutritionByIDImage | GET /food/products/{id}/nutritionWidget.png | Product Nutrition by ID Image SpoonacularApi.ProductsApi | productNutritionLabelImage | GET /food/products/{id}/nutritionLabel.png | Product Nutrition Label Image SpoonacularApi.ProductsApi | productNutritionLabelWidget | GET /food/products/{id}/nutritionLabel | Product Nutrition Label Widget SpoonacularApi.ProductsApi | searchGroceryProducts | GET /food/products/search | Search Grocery Products SpoonacularApi.ProductsApi | searchGroceryProductsByUPC | GET /food/products/upc/{upc} | Search Grocery Products by UPC SpoonacularApi.ProductsApi | visualizeProductNutritionByID | GET /food/products/{id}/nutritionWidget | Product Nutrition by ID Widget SpoonacularApi.RecipesApi | analyzeARecipeSearchQuery | GET /recipes/queries/analyze | Analyze a Recipe Search Query SpoonacularApi.RecipesApi | analyzeRecipeInstructions | POST /recipes/analyzeInstructions | Analyze Recipe Instructions SpoonacularApi.RecipesApi | autocompleteRecipeSearch | GET /recipes/autocomplete | Autocomplete Recipe Search SpoonacularApi.RecipesApi | classifyCuisine | POST /recipes/cuisine | Classify Cuisine SpoonacularApi.RecipesApi | computeGlycemicLoad | POST /food/ingredients/glycemicLoad | Compute Glycemic Load SpoonacularApi.RecipesApi | convertAmounts | GET /recipes/convert | Convert Amounts SpoonacularApi.RecipesApi | createRecipeCard | POST /recipes/visualizeRecipe | Create Recipe Card SpoonacularApi.RecipesApi | equipmentByIDImage | GET /recipes/{id}/equipmentWidget.png | Equipment by ID Image SpoonacularApi.RecipesApi | extractRecipeFromWebsite | GET /recipes/extract | Extract Recipe from Website SpoonacularApi.RecipesApi | getAnalyzedRecipeInstructions | GET /recipes/{id}/analyzedInstructions | Get Analyzed Recipe Instructions SpoonacularApi.RecipesApi | getRandomRecipes | GET /recipes/random | Get Random Recipes SpoonacularApi.RecipesApi | getRecipeEquipmentByID | GET /recipes/{id}/equipmentWidget.json | Equipment by ID SpoonacularApi.RecipesApi | getRecipeInformation | GET /recipes/{id}/information | Get Recipe Information SpoonacularApi.RecipesApi | getRecipeInformationBulk | GET /recipes/informationBulk | Get Recipe Information Bulk SpoonacularApi.RecipesApi | getRecipeIngredientsByID | GET /recipes/{id}/ingredientWidget.json | Ingredients by ID SpoonacularApi.RecipesApi | getRecipeNutritionWidgetByID | GET /recipes/{id}/nutritionWidget.json | Nutrition by ID SpoonacularApi.RecipesApi | getRecipePriceBreakdownByID | GET /recipes/{id}/priceBreakdownWidget.json | Price Breakdown by ID SpoonacularApi.RecipesApi | getRecipeTasteByID | GET /recipes/{id}/tasteWidget.json | Taste by ID SpoonacularApi.RecipesApi | getSimilarRecipes | GET /recipes/{id}/similar | Get Similar Recipes SpoonacularApi.RecipesApi | guessNutritionByDishName | GET /recipes/guessNutrition | Guess Nutrition by Dish Name SpoonacularApi.RecipesApi | ingredientsByIDImage | GET /recipes/{id}/ingredientWidget.png | Ingredients by ID Image SpoonacularApi.RecipesApi | parseIngredients | POST /recipes/parseIngredients | Parse Ingredients SpoonacularApi.RecipesApi | priceBreakdownByIDImage | GET /recipes/{id}/priceBreakdownWidget.png | Price Breakdown by ID Image SpoonacularApi.RecipesApi | quickAnswer | GET /recipes/quickAnswer | Quick Answer SpoonacularApi.RecipesApi | recipeNutritionByIDImage | GET /recipes/{id}/nutritionWidget.png | Recipe Nutrition by ID Image SpoonacularApi.RecipesApi | recipeNutritionLabelImage | GET /recipes/{id}/nutritionLabel.png | Recipe Nutrition Label Image SpoonacularApi.RecipesApi | recipeNutritionLabelWidget | GET /recipes/{id}/nutritionLabel | Recipe Nutrition Label Widget SpoonacularApi.RecipesApi | recipeTasteByIDImage | GET /recipes/{id}/tasteWidget.png | Recipe Taste by ID Image SpoonacularApi.RecipesApi | searchRecipes | GET /recipes/complexSearch | Search Recipes SpoonacularApi.RecipesApi | searchRecipesByIngredients | GET /recipes/findByIngredients | Search Recipes by Ingredients SpoonacularApi.RecipesApi | searchRecipesByNutrients | GET /recipes/findByNutrients | Search Recipes by Nutrients SpoonacularApi.RecipesApi | summarizeRecipe | GET /recipes/{id}/summary | Summarize Recipe SpoonacularApi.RecipesApi | visualizeEquipment | POST /recipes/visualizeEquipment | Equipment Widget SpoonacularApi.RecipesApi | visualizePriceBreakdown | POST /recipes/visualizePriceEstimator | Price Breakdown Widget SpoonacularApi.RecipesApi | visualizeRecipeEquipmentByID | GET /recipes/{id}/equipmentWidget | Equipment by ID Widget SpoonacularApi.RecipesApi | visualizeRecipeIngredientsByID | GET /recipes/{id}/ingredientWidget | Ingredients by ID Widget SpoonacularApi.RecipesApi | visualizeRecipeNutrition | POST /recipes/visualizeNutrition | Recipe Nutrition Widget SpoonacularApi.RecipesApi | visualizeRecipeNutritionByID | GET /recipes/{id}/nutritionWidget | Recipe Nutrition by ID Widget SpoonacularApi.RecipesApi | visualizeRecipePriceBreakdownByID | GET /recipes/{id}/priceBreakdownWidget | Price Breakdown by ID Widget SpoonacularApi.RecipesApi | visualizeRecipeTaste | POST /recipes/visualizeTaste | Recipe Taste Widget SpoonacularApi.RecipesApi | visualizeRecipeTasteByID | GET /recipes/{id}/tasteWidget | Recipe Taste by ID Widget SpoonacularApi.WineApi | getDishPairingForWine | GET /food/wine/dishes | Dish Pairing for Wine SpoonacularApi.WineApi | getWineDescription | GET /food/wine/description | Wine Description SpoonacularApi.WineApi | getWinePairing | GET /food/wine/pairing | Wine Pairing SpoonacularApi.WineApi | getWineRecommendation | GET /food/wine/recommendation | Wine Recommendation
Documentation for Models
- SpoonacularApi.FoodIngredientsMapProducts
- SpoonacularApi.InlineObject
- SpoonacularApi.InlineObject1
- SpoonacularApi.InlineObject10
- SpoonacularApi.InlineObject2
- SpoonacularApi.InlineObject3
- SpoonacularApi.InlineObject4
- SpoonacularApi.InlineObject5
- SpoonacularApi.InlineObject6
- SpoonacularApi.InlineObject7
- SpoonacularApi.InlineObject8
- SpoonacularApi.InlineObject9
- SpoonacularApi.InlineResponse200
- SpoonacularApi.InlineResponse2001
- SpoonacularApi.InlineResponse20010
- SpoonacularApi.InlineResponse20010Amount
- SpoonacularApi.InlineResponse20010AmountMetric
- SpoonacularApi.InlineResponse20010Ingredients
- SpoonacularApi.InlineResponse20011
- SpoonacularApi.InlineResponse20011Ingredients
- SpoonacularApi.InlineResponse20012
- SpoonacularApi.InlineResponse20013
- SpoonacularApi.InlineResponse20013Ingredients
- SpoonacularApi.InlineResponse20013Ingredients1
- SpoonacularApi.InlineResponse20013ParsedInstructions
- SpoonacularApi.InlineResponse20013Steps
- SpoonacularApi.InlineResponse20014
- SpoonacularApi.InlineResponse20015
- SpoonacularApi.InlineResponse20016
- SpoonacularApi.InlineResponse20017
- SpoonacularApi.InlineResponse20018
- SpoonacularApi.InlineResponse20018Dishes
- SpoonacularApi.InlineResponse20018Ingredients
- SpoonacularApi.InlineResponse20019
- SpoonacularApi.InlineResponse2002
- SpoonacularApi.InlineResponse20020
- SpoonacularApi.InlineResponse20021
- SpoonacularApi.InlineResponse20021Calories
- SpoonacularApi.InlineResponse20021CaloriesConfidenceRange95Percent
- SpoonacularApi.InlineResponse20022
- SpoonacularApi.InlineResponse20022Nutrition
- SpoonacularApi.InlineResponse20023
- SpoonacularApi.InlineResponse20023Ingredients
- SpoonacularApi.InlineResponse20024
- SpoonacularApi.InlineResponse20025
- SpoonacularApi.InlineResponse20025Results
- SpoonacularApi.InlineResponse20026
- SpoonacularApi.InlineResponse20027
- SpoonacularApi.InlineResponse20028
- SpoonacularApi.InlineResponse20028Ingredients
- SpoonacularApi.InlineResponse20028Nutrition
- SpoonacularApi.InlineResponse20028Servings
- SpoonacularApi.InlineResponse20029
- SpoonacularApi.InlineResponse20029CustomFoods
- SpoonacularApi.InlineResponse2003
- SpoonacularApi.InlineResponse20030
- SpoonacularApi.InlineResponse20030Ingredients
- SpoonacularApi.InlineResponse20031
- SpoonacularApi.InlineResponse20031ComparableProducts
- SpoonacularApi.InlineResponse20031ComparableProductsProtein
- SpoonacularApi.InlineResponse20032
- SpoonacularApi.InlineResponse20032Results
- SpoonacularApi.InlineResponse20033
- SpoonacularApi.InlineResponse20034
- SpoonacularApi.InlineResponse20035
- SpoonacularApi.InlineResponse20035MenuItems
- SpoonacularApi.InlineResponse20036
- SpoonacularApi.InlineResponse20037
- SpoonacularApi.InlineResponse20037Nutrients
- SpoonacularApi.InlineResponse20038
- SpoonacularApi.InlineResponse20038Days
- SpoonacularApi.InlineResponse20038Items
- SpoonacularApi.InlineResponse20038NutritionSummary
- SpoonacularApi.InlineResponse20038NutritionSummaryNutrients
- SpoonacularApi.InlineResponse20038Value
- SpoonacularApi.InlineResponse20039
- SpoonacularApi.InlineResponse2003ExtendedIngredients
- SpoonacularApi.InlineResponse2003Measures
- SpoonacularApi.InlineResponse2003MeasuresMetric
- SpoonacularApi.InlineResponse2003WinePairing
- SpoonacularApi.InlineResponse2003WinePairingProductMatches
- SpoonacularApi.InlineResponse2004
- SpoonacularApi.InlineResponse20040
- SpoonacularApi.InlineResponse20040Items
- SpoonacularApi.InlineResponse20040Value
- SpoonacularApi.InlineResponse20041
- SpoonacularApi.InlineResponse20041Days
- SpoonacularApi.InlineResponse20041Items
- SpoonacularApi.InlineResponse20041Value
- SpoonacularApi.InlineResponse20042
- SpoonacularApi.InlineResponse20042Aisles
- SpoonacularApi.InlineResponse20042Items
- SpoonacularApi.InlineResponse20042Measures
- SpoonacularApi.InlineResponse20043
- SpoonacularApi.InlineResponse20044
- SpoonacularApi.InlineResponse20045
- SpoonacularApi.InlineResponse20045ProductMatches
- SpoonacularApi.InlineResponse20046
- SpoonacularApi.InlineResponse20047
- SpoonacularApi.InlineResponse20047RecommendedWines
- SpoonacularApi.InlineResponse20048
- SpoonacularApi.InlineResponse20049
- SpoonacularApi.InlineResponse20049Category
- SpoonacularApi.InlineResponse20049Nutrition
- SpoonacularApi.InlineResponse20049NutritionCalories
- SpoonacularApi.InlineResponse20049NutritionCaloriesConfidenceRange95Percent
- SpoonacularApi.InlineResponse20049Recipes
- SpoonacularApi.InlineResponse2005
- SpoonacularApi.InlineResponse20050
- SpoonacularApi.InlineResponse20051
- SpoonacularApi.InlineResponse20052
- SpoonacularApi.InlineResponse20053
- SpoonacularApi.InlineResponse20053Results
- SpoonacularApi.InlineResponse20053SearchResults
- SpoonacularApi.InlineResponse20054
- SpoonacularApi.InlineResponse20054Videos
- SpoonacularApi.InlineResponse20055
- SpoonacularApi.InlineResponse20056
- SpoonacularApi.InlineResponse20057
- SpoonacularApi.InlineResponse20057Suggests
- SpoonacularApi.InlineResponse2006
- SpoonacularApi.InlineResponse2006Recipes
- SpoonacularApi.InlineResponse2007
- SpoonacularApi.InlineResponse2008
- SpoonacularApi.InlineResponse2009
- SpoonacularApi.InlineResponse200Results
- SpoonacularApi.RecipesFindByIngredientsMissedIngredients
- SpoonacularApi.RecipesParseIngredientsEstimatedCost
- SpoonacularApi.RecipesParseIngredientsNutrition
- SpoonacularApi.RecipesParseIngredientsNutritionCaloricBreakdown
- SpoonacularApi.RecipesParseIngredientsNutritionNutrients
- SpoonacularApi.RecipesParseIngredientsNutritionProperties
- SpoonacularApi.RecipesParseIngredientsNutritionWeightPerServing
Documentation for Authorization
apiKeyScheme
- Type: API key
- API key parameter name: apiKey
- Location: URL query string