Closed RandomUsername1315 closed 3 months ago
@medwardson The best way to test the functionality is to set the start navigation in MainActivity
from this:
val startDestination = if (authentication.isAuthenticated()) Route.Home else Route.Register
to this :
val startDestination = if (authentication.isAuthenticated()) Route.RecipeRecFlow else Route.RecipeRecFlow
Issues
5 New issues
0 Accepted issues
Measures
0 Security Hotspots
67.3% Coverage on New Code
0.0% Duplication on New Code
Pull Request Overview
This PR adds the backend functionality for the recipe recommendation. It includes all new API calls necessary and the deserialization of the JSON.
Main Changes
RecipeInstructionResponseAPI.kt
class: Represents the response of possible recipes that can be made given a list of ingredients from Spoonacular.SpoonacularAPI.kt
class: Added two functions, one that fetches the steps/instructions to make a recipe and another that handles all the calls necessary to create complete recipes with steps (two API calls) given a list of strings.RecipeInstructions.kt
class: A card that displays a single step for a recipe.RecipeRecommendationMoreDetailScreen.kt
class: Shows a loading animation while it fetches data from the API.Video of the New Implementation
Just for reference what you see in the video made 12 API calls :
https://github.com/swent-group10/polyfit/assets/100274930/cd1d6dbc-7074-4f8c-9455-e0ba057c48ea
Future PR
Note for Reviewers
Note