https://badgen.net/runkit/cal-badge-icd0onfvrxx6/Asia/Shanghai
──┬─────────────────── ──┬──────────
└─ endpoint-id └─ path-args (optional)https://runkit.com/home#endpoint
If you are not familiar with RunKit endpoint, this guide would help.
Create a RunKit notebook (e.g. https://runkit.com/amio/cal-badge), which gives you an endpoint:
https://cal-badge-icd0onfvrxx6.runkit.shit returns a JSON like:
{
"subject": "2019",
"status": "6-1",
"color": "blue"
}Click endpoint on notebook page for the endpoint address, then you have endpoint-id from it's subdomain:
cal-badge-icd0onfvrxx6Use endpoint-id within badgen url:
https://badgen.net/runkit/cal-badge-icd0onfvrxx6That's it:
Furthermore, you can append arbitrary path args (e.g. /Asia/Shanghai) to the end of badgen url, Badgen will request RunKit endpoint with that. This badge:
https://badgen.net/runkit/cal-badge-icd0onfvrxx6/Asia/Shanghairepresents data from:
https://cal-badge-icd0onfvrxx6.runkit.sh/Asia/Shanghai/runkit/:endpoint-id/:path*