03. Leveraging Spoonacular API
The Spoonacular API is an incredibly well-documented API that allows develops to tap into a robust database of recipes. By combining many of their functions you can search for recipes by ingredients, nutritional information and more. For the purposes of building Sous, I took advantage of the "Complex Search Functionality" to provide a recipe based on my collected user preferences, as well as the "Extract Recipe Information" in order to gather a source URL and supporting image.
In order to successfully use the API, much of the collected information had to be cleaned and "escaped" in order to be passed back into the API. The code below illustrates the reveal intent which surfaces all of the session attributes and passes them through three functions, find_recipe, find_image, and find_URL.
Content Rating
Is this a good/useful/informative piece of content to include in the project? Have your say!
You must login before you can post a comment. .