[WIP] Reworked the way the spoonaccular api response gets consumed

- Added pojos for jackson
- Filtering unneeded information from spoonaccular response
This commit is contained in:
2022-07-12 17:24:57 +02:00
parent e969c32f83
commit f7455019c3
18 changed files with 650 additions and 150 deletions

View File

@@ -0,0 +1,59 @@
package spoonaccular.models.recipe_by_ingredient;
import com.fasterxml.jackson.annotation.JsonProperty;
import spoonaccular.models.recipe_information.Recipe;
import java.util.List;
public class ExtendedRecipeByIngredient extends Recipe {
@JsonProperty("usedIngredientCount")
private Integer usedIngredientCount;
@JsonProperty("missedIngredientCount")
private Integer missedIngredientCount;
@JsonProperty("missedIngredients")
private List<MissedIngredient> missedIngredients = null;
@JsonProperty("usedIngredients")
private List<UsedIngredient> usedIngredients = null;
@JsonProperty("usedIngredientCount")
public Integer getUsedIngredientCount() {
return usedIngredientCount;
}
@JsonProperty("usedIngredientCount")
public void setUsedIngredientCount(Integer usedIngredientCount) {
this.usedIngredientCount = usedIngredientCount;
}
@JsonProperty("missedIngredientCount")
public Integer getMissedIngredientCount() {
return missedIngredientCount;
}
@JsonProperty("missedIngredientCount")
public void setMissedIngredientCount(Integer missedIngredientCount) {
this.missedIngredientCount = missedIngredientCount;
}
@JsonProperty("missedIngredients")
public List<MissedIngredient> getMissedIngredients() {
return missedIngredients;
}
@JsonProperty("missedIngredients")
public void setMissedIngredients(List<MissedIngredient> missedIngredients) {
this.missedIngredients = missedIngredients;
}
@JsonProperty("usedIngredients")
public List<UsedIngredient> getUsedIngredients() {
return usedIngredients;
}
@JsonProperty("usedIngredients")
public void setUsedIngredients(List<UsedIngredient> usedIngredients) {
this.usedIngredients = usedIngredients;
}
}