badges
badges copied to clipboard
Generate your badges ✨ - LeetCode
Badges
Some badges generated with Shields.io
-
LeetCode
- Name
- Ranking
- Accepted Rate
- Solved Problems
- Submissions
- Customize Style
-
Host Your Own
- Jar Package
- Docker Image
- To-do
- License
LeetCode
Show your awesome LeetCode badges.
Name
https://badges.peiyuan.ch/leetcode/{username}/name
Ranking
https://badges.peiyuan.ch/leetcode/{username}/ranking
Accepted Rate
https://badges.peiyuan.ch/leetcode/{username}/rate?difficulty=<value>
Query | Value | Default | Description |
---|---|---|---|
difficulty | all / easy / medium / hard |
all |
Identity the submission of difficulty |
Solved Problems
https://badges.peiyuan.ch/leetcode/{username}/solved?difficulty=<value>
Query | Value | Default | Description |
---|---|---|---|
difficulty | all / easy / medium / hard |
all |
Identity the submission of difficulty |
Submissions
https://badges.peiyuan.ch/leetcode/{username}/submission?accepted=<value>&difficulty=<value>
Query | Value | Default | Description |
---|---|---|---|
accepted | true / false |
false |
Accepted Submissions or Total Submissions |
difficulty | all / easy / medium / hard |
all |
Identity the submission of difficulty |
Customize Style
Since the all badges are generated by Shields.io, most of shied query parameters are supported as well:
https://badges.peiyuan.ch/leetcode/puiiyuen/ranking?logo=leetcode&label=puiiyuen&style=for-the-badge&color=green
Parameter | Support | Demo |
---|---|---|
style | Yes | |
label | Yes | |
labelColor | Yes | |
color | Yes | |
logo | Yes | |
logoColor | Yes | |
logoWidth | Yes | |
link | Yes* | N/A on GitHub README |
cacheSeconds | No | N/A |
-
Refer to Shields.io: Specify what clicking on the left/right of a badge should do. Note that
this only works when integrating your badge in an
<object>
HTML tag, but not an<img>
tag or a markup language.
Host Your Own
JDK Version 11 | API Documentations
Jar Package
Build the package
./gradlew clean build
Run jar package
Directory:
.
└── build
└── libs
└── badges-{version}.jar
java -jar badges-{version}.jar
Docker Image
docker run -d -p 8080:8080 puiiyuen/badge
Build Your Own Image
Use Google Jib
In build.gradle
, configure your own parameters:
jib {
to {
image = '{username}/{repository}'
}
container {
ports = ['8080']
}
}
Run:
./gralew jib
The docker image will be built and pushed to your remote registry. For more configurations, please refer to Google Jib Gradle Plugin
Build with Dockerfile
Ref:
To-do
- [ ] Handle Exception
License
MIT