ageddesi/Mocked-API

Add new Nutrition endpoint

ageddesi opened this issue · 5 comments

Add a new endpoint for nutrition. We can start with fruit which I have added below.

Endpoints:

/food/nutrition/fruits/
/food/nutrition/fruits/:qty

image

Hi @ageddesi! I'm gauravitude from the discord server, could you please assign this issue to me?

Hi @ageddesi, I'm The Dark Remo from the discord server. We found a good dataset covering more categories than just fruits. So, we thought of making a dynamic endpoint to deal with all the categories, ie:

/food/nutrition
/food/nutrition/:qty
/food/nutrition/:category
/food/nutrition/:category/:qty

And the categories we would like to cover are:

  • Dairy
  • Vegetables
  • Fruits
  • Grains
  • Protein
  • Beverages

Alternate solution to dynamic endpoint, would be to create 2 endpoints for each category, ie:

/food/nutrition/
/food/nutrition/:qty
/food/nutrition/fruits
/food/nutrition/fruits/:qty
/food/nutrition/dairy
/food/nutrition/dairy/:qty
.
.
.

Let me know your thoughts.

Hey thats awesome.

Can you let me know the license for that data source please.

If you look at the animals endpoint you xan see i like to be specific with the urls so I prefer the second option.

Awesome work.

Hey @ageddesi, the data we are using is from Government of Canada's Canadian Nutrient File (CNF). Following is a link to the website: https://www.canada.ca/en/health-canada/services/food-nutrition/healthy-eating/nutrient-data/canadian-nutrient-file-2015-download-files.html.