2020-03-05, 05:51
Hey, first of all: good job! Your API is great!
May I suggest an alteration to the endpoint lookup.php
Instead of having a fixed number of ingredients like:
a better OO modelling of that JSON could be:
May I suggest an alteration to the endpoint lookup.php
Instead of having a fixed number of ingredients like:
json:
"strIngredient1": "soy sauce",
"strIngredient2": "water",
"strIngredient3": "brown sugar",
...
"strMeasure1": "3/4 cup",
"strMeasure2": "1/2 cup",
"strMeasure3": "1/4 cup",
...
a better OO modelling of that JSON could be:
json:
"ingredients": [
{
"str": "soy sauce",
"measure": "3/4 cup"
},
{
"str": "water",
"measure": "1 cup"
},
...
]