營養資料類型
營養資料的資料類型。
水份
每個資料點代表使用者一次飲用的水量。
名稱 com.google.hydration
OAuth 權限範圍
https://www.googleapis.com/auth/fitness.nutrition.read
https://www.googleapis.com/auth/fitness.nutrition.write
欄位 (格式:units)
音量 (float
- 公升)
耗用的水量。
名稱 com.google.hydration
資料類型物件 TYPE_HYDRATION
欄位 (格式:units)
FIELD_VOLUME (float
—公升)
耗用的液體量。
營養
每個資料點代表一部分吃到的營養素
食物或食品資料點包含多個欄位。營養素欄位是
這通常代表交易
不會十分要求關聯語意餐飲類型和/或食物項目欄位必須擇一填寫。
注意: 如果已知確切的餐點時間,請新增這些特定的開始和結束時間。如果
不要加入餐點所攝取一般時間範圍的開始和結束時間。
名稱 com.google.nutrition
OAuth 權限範圍
https://www.googleapis.com/auth/fitness.nutrition.read
https://www.googleapis.com/auth/fitness.nutrition.write
欄位 (格式:units)
meal type (int
:列舉) (選填欄位)
使用者吃了什麼餐點。
接受的值
"intVal": 1 // Unknown
"intVal": 2 // Breakfast
"intVal": 3 // Lunch
"intVal": 4 // Dinner
"intVal": 5 // Snack
食物品 (string
—不適用)
項目的特定食物項目。例如「香蕉」或「粉筆」
營養素 (Map<String>
:卡路里/公克)
所攝取食物的營養細分。
接受的值
"key": "calories" // Calories in kcal
"key": "fat.total" // Total fat in grams
"key": "fat.saturated" // Saturated fat in grams
"key": "fat.unsaturated" // Unsaturated fat in grams
"key": "fat.polyunsaturated" // Polyunsaturated fat in grams
"key": "fat.monounsaturated" // Monounsaturated fat in grams
"key": "fat.trans" // Trans fat in grams
"key": "cholesterol" // Cholesterol in milligrams
"key": "sodium" // Sodium in milligrams
"key": "potassium" // Potassium in milligrams
"key": "carbs.total" // Total carbohydrates in grams
"key": "dietary_fiber" // Dietary fiber in grams
"key": "sugar" // Amount of sugar in grams
"key": "protein" // Protein amount in grams
名稱 com.google.nutrition
資料類型物件 TYPE_NUTRITION
欄位 (格式:units)
FIELD_MEAL_TYPE (int
:列舉) (選用欄位)
使用者吃了什麼餐點。
接受的值
MEAL_TYPE_UNKNOWN // Unknown
MEAL_TYPE_BREAKFAST // Breakfast
MEAL_TYPE_LUNCH // Lunch
MEAL_TYPE_DINNER // Dinner
MEAL_TYPE_SNACK // Snack
FIELD_FOOD_ITEM (string
:任意形式的文字)
項目食物的說明。例如「香蕉」或「粉筆」
FIELD_NUTRIENTS (Map<String>
—公斤/公克/毫克)
所攝取食物的營養細分。
接受的值
NUTRIENT_CALORIES // Calories in kcal
NUTRIENT_TOTAL_FAT // Total fat in grams
NUTRIENT_SATURATED_FAT // Saturated fat in grams
NUTRIENT_UNSATURATED_FAT // Unsaturated fat in grams
NUTRIENT_POLYUNSATURATED_FAT // Polyunsaturated fat in grams
NUTRIENT_MONOUNSATURATED_FAT // Monounsaturated fat in grams
NUTRIENT_TRANS_FAT // Trans fat in grams
NUTRIENT_CHOLESTEROL // Cholesterol in milligrams
NUTRIENT_SODIUM // Sodium in milligrams
NUTRIENT_POTASSIUM // Potassium in milligrams
NUTRIENT_TOTAL_CARBS // Total carbohydrates in grams
NUTRIENT_DIETARY_FIBER // Dietary fiber in grams
NUTRIENT_SUGAR // Amount of sugar in grams
NUTRIENT_PROTEIN // Protein amount in grams
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權 ,程式碼範例則為阿帕契 2.0 授權 。詳情請參閱《Google Developers 網站政策 》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2024-08-22 (世界標準時間)。
[null,null,["上次更新時間:2024-08-22 (世界標準時間)。"],[[["Hydration data represents the volume of water consumed in a single drink, measured in liters."],["Nutrition data includes the nutritional breakdown of food items and meals, with fields for meal type, food item, and nutrients."],["Data can be accessed using REST APIs or Android, requiring specific OAuth permissions for read and write access."],["Nutrient information is recorded in calories, grams, or milligrams, covering macronutrients like fat, carbohydrates, and protein, along with micronutrients like sodium and potassium."]]],[]]