badgen.net/pages/docs/runkit.mdx

52 wiersze
1.8 KiB
Plaintext
Czysty Zwykły widok Historia

2018-08-14 15:27:35 +00:00
# /runkit
Create arbitrary live badge with RunKit's online IDE.
![](/badge/badgen/runkit)
## Website
https://runkit.com/home#endpoint
## Usage
- `/runkit/:endpoint-id` _generate badge by data from endpoint-id.runkit.sh_
- `/runkit/:endpoint-id/:args` _generate badge by data from endpoint-id.runkit.sh with args_
## How to
If you are not familiar with RunKit endpoint, [this guide](https://runkit.com/docs/endpoint) would help.
2018-08-16 03:12:18 +00:00
1. Create a RunKit notebook ([e.g.](https://runkit.com/amio/peoples)), response with JSON like:
2018-08-14 15:27:35 +00:00
2018-08-16 03:12:18 +00:00
{
subject: 'community',
status: '11363 members',
color: 'green'
}
2018-08-14 15:27:35 +00:00
2018-08-16 03:12:18 +00:00
2. Click "endpoint" on notebook page to get the endpoint:
2018-08-14 15:27:35 +00:00
2018-08-16 03:12:18 +00:00
https://people-txwpy888xiuk.runkit.sh/
2018-08-14 15:27:35 +00:00
2018-08-16 03:12:18 +00:00
3. Use this id (`people-txwpy888xiuk`) with Badgen, this is the badge url (with param `102909`):
2018-08-14 15:27:35 +00:00
2018-08-16 03:12:18 +00:00
https://badgen.net/runkit/people-txwpy888xiuk/102909
2018-08-14 15:27:35 +00:00
## Examples
RunKit Notebook: https://runkit.com/amio/peoples
[![](https://badgen.net/runkit/peoples-txwpy888xiuk/102909)](https://badgen.net/runkit/peoples-txwpy888xiuk/102909)
RunKit Notebook: https://runkit.com/amio/satisfaction
[![](https://badgen.net/runkit/satisfaction-flq08o9mm3ka/102909/employee)](https://badgen.net/runkit/satisfaction-flq08o9mm3ka/102909/employee)
[![](https://badgen.net/runkit/satisfaction-flq08o9mm3ka/102909/people)](https://badgen.net/runkit/satisfaction-flq08o9mm3ka/102909/people)
[![](https://badgen.net/runkit/satisfaction-flq08o9mm3ka/102909/topic)](https://badgen.net/runkit/satisfaction-flq08o9mm3ka/102909/topic)
RunKit Notebook: https://runkit.com/amio/cal-badge
[![](https://badgen.net/runkit/cal-badge-icd0onfvrxx6)](https://badgen.net/runkit/cal-badge-icd0onfvrxx6)
[![](https://badgen.net/runkit/cal-badge-icd0onfvrxx6/Asia/Shanghai)](https://badgen.net/runkit/cal-badge-icd0onfvrxx6/Asia/Shanghai)