Badges
Customizable SVG badges for coding stats
Ziit allows you to display your coding activity using customizable badges that can be embedded on your profile, README, or website. These badges show your coding time statistics in a visual format.
Badge Structure
The badge URL follows this pattern:
https://ziit.app/api/public/badge/:userId/:project/:timeRange/:color/:labelText?
Parameters
Parameter | Description | Default |
---|---|---|
userId | Your Ziit user ID | Required |
project | Project name or "all" for all projects | "all" |
timeRange | Time period to display stats for | "all-time" |
color | Badge color | "blue" |
labelText | Text for the badge label | "Ziit" |
Usage Examples
Basic Badge
This badge shows your total coding time across all projects:
https://ziit.app/api/public/badge/cm98il90n0000o52c3my0bf5p
Project-Specific Badge
Display coding time for a specific project:
https://ziit.app/api/public/badge/cm98il90n0000o52c3my0bf5p/ziit
Custom Time Range
Show coding time for a specific time period:
https://ziit.app/api/public/badge/cm98il90n0000o52c3my0bf5p/all/all-time
https://ziit.app/api/public/badge/cm98il90n0000o52c3my0bf5p/all/today
https://ziit.app/api/public/badge/cm98il90n0000o52c3my0bf5p/all/yesterday
https://ziit.app/api/public/badge/cm98il90n0000o52c3my0bf5p/all/week
https://ziit.app/api/public/badge/cm98il90n0000o52c3my0bf5p/all/month
https://ziit.app/api/public/badge/cm98il90n0000o52c3my0bf5p/all/last-90-days
https://ziit.app/api/public/badge/cm98il90n0000o52c3my0bf5p/all/month-to-date
https://ziit.app/api/public/badge/cm98il90n0000o52c3my0bf5p/all/last-month
https://ziit.app/api/public/badge/cm98il90n0000o52c3my0bf5p/all/year-to-date
https://ziit.app/api/public/badge/cm98il90n0000o52c3my0bf5p/all/last-12-months
Custom Style
Customize the badge appearance:
https://ziit.app/api/public/badge/cm98il90n0000o52c3my0bf5p/all/all-time/green/Coding Time
Available Colors
Standard colors include: blue, green, red, orange, yellow, purple, and black. You can also use hex color codes (without the #).
Query Parameters
You can further customize badges using query parameters:
Parameter | Description | Values |
---|---|---|
style | Badge style | "classic" (default), "flat" |
icon | Icon URL | Direct URL to an image (e.g. SVG, PNG, JPG) |
Example with query parameters:
https://ziit.app/api/public/badge/cm98il90n0000o52c3my0bf5p?style=flat&icon=https://example.com/icon.svg