nutrition-logs #356
- userId
-
Lazaro Herzog @lazaro_herzog
- date
- 2025-09-22
- totalCalories
- 1501
- totalProteinGrams
- 164.6
- totalCarbsGrams
- 102.7
- totalFatGrams
- 48
- waterMl
- 1402
- createdAt
Overview
nutrition-logs / #356
#356
#356
Request
curl example
curl -sS \ "https://example-data.com/api/v1/nutrition-logs/356" \ -H "Accept: application/json"
JavaScript example
const res = await fetch( "https://example-data.com/api/v1/nutrition-logs/356" ); const nutritionLog = await res.json();
TypeScript example
// Download once: mkdir -p types && curl -o types/nutrition-logs.d.ts https://example-data.com/types/nutrition-logs.d.ts
import type { NutritionLog } from "./types/nutrition-logs";
const res = await fetch(
"https://example-data.com/api/v1/nutrition-logs/356"
);
const nutritionLog = (await res.json()) as NutritionLog; Python example
import requests
res = requests.get(
"https://example-data.com/api/v1/nutrition-logs/356"
)
nutrition_log = res.json() Response
{
"id": 356,
"userId": 181,
"date": "2025-09-22",
"totalCalories": 1501,
"totalProteinGrams": 164.6,
"totalCarbsGrams": 102.7,
"totalFatGrams": 48,
"waterMl": 1402,
"createdAt": "2025-09-22T23:59:59.999Z"
}