Yazio
Lightweight JS/TS client for the YAZIO API. Track calories, log items, and build integrations easily.
Install / Use
/learn @juriadams/YazioREADME
yazio
A lightweight, zero-dependency JavaScript/TypeScript client for the undocumented YAZIO API. Easily track calories, log items, and integrate YAZIO into your projects.
Motivation
Built to enable personal dashboards and calendar integrations for calorie tracking. Open-sourced for community benefit.
Getting Started
Installing
bun add yazio
npm install yazio
Usage
Here's a quick example of how to use yazio in your project:
// Basic Usage
import { Yazio } from "yazio";
const yazio = new Yazio({
credentials: {
username: "juri@acme.co",
password: "super-secure-password",
},
});
const items = await getConsumedItems({ date: new Date(/* ... */) });
// Advanced Usage
import { Yazio } from "yazio";
import { kv } from "@vercel/kv";
const yazio = new Yazio({
// Resolve cached tokens from KV. Tokens are stored and re-used from memory
// as long as they are still valid.
token: kv.get("tokens:juri@acme.co"),
// If a fresh token was received, cache it.
onRefresh: ({ token }) =>
kv.set("tokens:juri@acme.co", JSON.stringify(token)),
// If no token was fetched yet, exchange the credentials for a new token.
credentials: {
username: "juri@acme.co",
password: "super-secure-password",
},
});
const summary = await yazio.user.getSummary({ date: new Date(/* ... */) });
See source code docs in src/index.ts for detailed usage. Documentation following shortly.
Related Skills
node-connect
347.0kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
107.8kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
347.0kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
347.0kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
