Download the PHP package pxgamer/spoonacularapi without Composer

On this page you can find all versions of the php package pxgamer/spoonacularapi. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package spoonacularapi

spoonacularapi

Latest Version on Packagist Build Status Style CI Code Coverage Total Downloads

The spoonacular Nutrition, Recipe, and Food API allows you to access over 360,000 recipes and 80,000 food products.

Install

Via Composer

Usage

You need the following information for initializing the API client.

Parameter Description
xMashapeKey The Mashape application you want to use for this session.

API client can be initialized as following.

Get singleton instance

The singleton instance of the class can be accessed from the API Client.

getProductInformation

Tags:

Get information about a packaged food product.

Parameters

Parameter Tags Description
id The id of the packaged food product.

Example Usage

findSimilarRecipes

Tags:

Find recipes which are similar to the given one.

Parameters

Parameter Tags Description
id The id of the source recipe to which similar recipes should be found.

Example Usage

getAutocompleteIngredientSearch

Tags:

Autocomplete a search for an ingredient.

Parameters

Parameter Tags Description
query The query - a partial or full ingredient name.

Example Usage

createVisualizePriceBreakdown

Tags:

Visualize the price breakdown of a recipe.

Parameters

Parameter Tags Description
ingredientList The ingredient list of the recipe, one ingredient per line.
servings The number of servings.
defaultCss Whether the widget should be styled with the default css.
mode The mode in which the widget should be delivered. 1 = separate views (compact), 2 = all in one view (full).
fieldParameters Additional optional form parameters are supported by this method

Example Usage

createVisualizeNutrition

Tags:

Visualize a recipe's nutritional information.

Parameters

Parameter Tags Description
ingredientList The ingredient list of the recipe, one ingredient per line.
servings The number of servings.
defaultCss Whether the ingredient list should be styled with the default css.
fieldParameters Additional optional form parameters are supported by this method

Example Usage

createVisualizeIngredients

Tags:

Visualize ingredients of a recipe.

Parameters

Parameter Tags Description
ingredientList The ingredient list of the recipe, one ingredient per line.
servings The initial number of servings.
defaultCss Whether the ingredient list should be styled with the default css.
measure The initial measure, either "metric" or "us".
view The initial view, either "grid" or "list".
fieldParameters Additional optional form parameters are supported by this method

Example Usage

getSummarizeRecipe

Tags:

Summarize the recipe in a short text.

Parameters

Parameter Tags Description
id The id of the recipe that should be summarized.

Example Usage

searchGroceryProducts

Tags:

Search packaged food products like frozen pizza and snickers bars.

Parameters

Parameter Tags Description
query The search query.
number The number of results to retrieve, defaults to 10.
offset The number of results to skip, defaults to 0.
queryParameters Additional optional query parameters are supported by this method

Example Usage

getQuickAnswer

Tags:

Answer a nutrition related natural language question.

Parameters

Parameter Tags Description
q The nutrition-related question.

Example Usage

getRecipeInformation

Tags:

Get information about a recipe.

Parameters

Parameter Tags Description
id The id of the recipe.

Example Usage

createParseIngredients

Tags:

Extract an ingredient from plain text.

Parameters

Parameter Tags Description
ingredientList The ingredient list of the recipe, one ingredient per line.
servings The number of servings that you can make from the ingredients.

Example Usage

createMapIngredients

Tags:

Map ingredients to food products.

Parameters

Parameter Tags Description
ingredientList A new line-separated list of ingredients.
servings The number of servings this recipe makes.

Example Usage

getExtractRecipeFromWebsite

Tags:

Extract recipe data from a recipe blog or Web page.

Parameters

Parameter Tags Description
url The URL of the recipe page.
forceExtraction If true, the extraction will be triggered no matter whether we know the recipe already. Use that only if information is missing as this operation is slower.
queryParameters Additional optional query parameters are supported by this method

Example Usage

getComputeDailyMealPlan

Tags:

Compute a meal plan for a day.

Parameters

Parameter Tags Description
targetCalories The target number of calories per day.
timeFrame For one day or a complete week, allowed values are "day" and "week".

Example Usage

createClassifyGroceryProductsBatch

Tags:

Given a set of product jsons, get back classified products.

Parameters

Parameter Tags Description
productJsonArray A JSON Array of products.

Example Usage

createClassifyCuisine

Tags:

Classify the recipe's cuisine.

Parameters

Parameter Tags Description
ingredientList The ingredient list of the recipe, one ingredient per line.
title The title of the recipe.

Example Usage

createClassifyAGroceryProduct

Tags:

Given a grocery product title, this endpoint allows you to detect what basic ingredient it is.

Parameters

Parameter Tags Description
productJson The json representation of a product.

Example Usage

searchRecipes

Tags:

Search recipes in natural language.

Parameters

Parameter Tags Description
query The (natural language) recipe search query.
cuisine The cuisine(s) of the recipes. One or more (comma separated) of the following: african, chinese, japanese, korean, vietnamese, thai, indian, british, irish, french, italian, mexican, spanish, middle eastern, jewish, american, cajun, southern, greek, german, nordic, eastern european, caribbean, or latin american.
diet The diet to which the recipes must be compliant. Possible values are: pescetarian, lacto vegetarian, ovo vegetarian, vegan, and vegetarian.
excludeIngredients An comma-separated list of ingredients or ingredient types that must not be contained in the recipes.
intolerances A comma-separated list of intolerances. All found recipes must not have ingredients that could cause problems for people with one of the given tolerances. Possible values are: dairy, egg, gluten, peanut, sesame, seafood, shellfish, soy, sulfite, tree nut, and wheat.
limitLicense Optional DefaultValue Whether the recipes should have an open license that allows for displaying with proper attribution.
number Optional DefaultValue The number of results to return (between 0 and 100).
offset Optional DefaultValue The number of results to skip (between 0 and 900).
type Optional DefaultValue The type of the recipes. One of the following: main course, side dish, dessert, appetizer, salad, bread, breakfast, soup, beverage, sauce, or drink.
queryParameters Optional Additional optional query parameters are supported by this method

Example Usage

findByNutrients

Tags: Skips Authentication

Find a set of recipes that adhere to the given nutrient limits. All the found recipes will have macro nutrients within the calories, protein, fat, and carbohydrate limits.

Parameters

Parameter Tags Description
maxcalories Optional DefaultValue The maximum number of calories the recipe can have.
maxcarbs Optional DefaultValue The maximum number of carbohydrates in grams the recipe can have.
maxfat Optional DefaultValue The maximum number of fat in grams the recipe can have.
maxprotein Optional DefaultValue The maximum number of protein in grams the recipe can have.
mincalories Optional DefaultValue The minimum number of calories the recipe must have.
minCarbs Optional DefaultValue The minimum number of carbohydrates in grams the recipe must have.
minfat Optional DefaultValue The minimum number of fat in grams the recipe must have.
minProtein Optional DefaultValue The minimum number of protein in grams the recipe must have.
queryParameters Optional Additional optional query parameters are supported by this method

Example Usage

findByIngredients

Tags: Skips Authentication

Find recipes that use as many of the given ingredients as possible and have as little as possible missing ingredients. This is a whats in your fridge API endpoint.

Parameters

Parameter Tags Description
ingredients Required DefaultValue A comma-separated list of ingredients that the recipes should contain.
limitLicense Optional DefaultValue Whether to only show recipes with an attribution license.
number Optional DefaultValue The maximal number of recipes to return (default = 5).
ranking Optional DefaultValue Whether to maximize used ingredients (1) or minimize missing ingredients (2) first.
queryParameters Optional Additional optional query parameters are supported by this method

Example Usage

createRecipeCard

Tags: Skips Authentication

Create a recipe card given a recipe.

Parameters

Parameter Tags Description
backgroundImage Required DefaultValue The background image ("none","background1", or "background2").
image Required DefaultValue The binary image of the recipe as jpg.
ingredients Required DefaultValue The ingredient list of the recipe, one ingredient per line.
instructions Required DefaultValue The instructions to make the recipe. One step per line.
mask Required DefaultValue The mask to put over the recipe image ("ellipseMask", "diamondMask", "diamondMask", "starMask", "heartMask", "potMask", "fishMask").
readyInMinutes Required DefaultValue The number of minutes it takes to get the recipe on the table.
servings Required DefaultValue The number of servings that you can make from the ingredients.
title Required DefaultValue The title of the recipe.
author Optional DefaultValue The author of the recipe.
backgroundColor Optional DefaultValue The background color on the recipe card as a hex-string.
fontColor Optional DefaultValue The font color on the recipe card as a hex-string.
source Optional DefaultValue The source of the recipe.
fieldParameters Optional Additional optional form parameters are supported by this method

Example Usage

Change log

Please see CHANGELOG for more information on what has changed recently.

Testing

$ composer test

Contributing

Please see CODE_OF_CONDUCT for details.

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.


All versions of spoonacularapi with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6
ext-curl Version *
ext-json Version *
ext-mbstring Version *
mashape/unirest-php Version ~3.0
apimatic/jsonmapper Version ~1.3
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package pxgamer/spoonacularapi contains the following files

Loading the files please wait ....