get_all_nutrient_info: get_all_nutrient_info(foodCode)

View source: R/endpoints.R

get_all_nutrient_infoR Documentation

get_all_nutrient_info(foodCode)

Description

Makes queries to the Canadian Nutrient APIs to get all available nutrient information about a particular food.

Usage

get_all_nutrient_info(foodCode, apiKey = NULL, lang = "en")

Arguments

foodCode

The code indicating the food you want to search for.

apiKey

Key to access the API. Can be retrieved from https://hc-sc.api.canada.ca/en/detail?api=cnf#!/Nutrient/get_nutrientamount. If none is provided, the system environment variables will be checked.

lang

The language to return results in, can be either 'en' or 'fr'.

Value

A tibble containing all available nutrient information about the food code.

Examples

## Not run: 
get_all_nutrient_info(foodCode = 45)

## End(Not run)

nutrientr documentation built on March 18, 2022, 6:27 p.m.