nutrition-logs #334
- userId
-
Alexander Beahan @alexander.beahan57
- date
- 2025-10-31
- totalCalories
- 2176
- totalProteinGrams
- 133.9
- totalCarbsGrams
- 167.2
- totalFatGrams
- 108
- waterMl
- 3425
- createdAt
Overview
nutrition-logs / #334
#334
#334
Request
curl example
curl -sS \ "https://example-data.com/api/v1/nutrition-logs/334" \ -H "Accept: application/json"
JavaScript example
const res = await fetch( "https://example-data.com/api/v1/nutrition-logs/334" ); 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/334"
);
const nutritionLog = (await res.json()) as NutritionLog; Python example
import requests
res = requests.get(
"https://example-data.com/api/v1/nutrition-logs/334"
)
nutrition_log = res.json() Response
{
"id": 334,
"userId": 169,
"date": "2025-10-31",
"totalCalories": 2176,
"totalProteinGrams": 133.9,
"totalCarbsGrams": 167.2,
"totalFatGrams": 108,
"waterMl": 3425,
"createdAt": "2025-10-31T23:59:59.999Z"
}