July 2018
Intermediate to advanced
404 pages
9h 5m
English
The BuildGetCookingInstruction function fulfills the GetCookingIntent request by querying the Spoonacular API, based on the food and diet type captured from the user request. In the case of an Alexa request, the food and diet type are stored in request.intent.slots.Foods.value and in request.intent.slots.DietTypes.value, whereas for a Dialogflow request, they are stored in req.body.queryResult.parameters.Foods and req.body.queryResult.parameters.DietTypes.
queryObject contains offset, foodName, and dietType to handle special cases when the user requests more recipes. queryObject will be stored and then retrieved from Redis, where offset is incremented by 3 and then sent by the GetOffset ...
Read now
Unlock full access