An open API service indexing awesome lists of open source software.

https://github.com/haozibi/leetcode-badge

LeetCode badges (LeetCode 徽标)
https://github.com/haozibi/leetcode-badge

badge badges calendar calendarheatmap go golang heatmap leetcode leetcode-cn

Last synced: about 2 months ago
JSON representation

LeetCode badges (LeetCode 徽标)

Awesome Lists containing this project

README

          

![](logo.png)

[![CircleCI](https://circleci.com/gh/haozibi/leetcode-badge/tree/master.svg?style=svg)](https://circleci.com/gh/haozibi/leetcode-badge/tree/master) [![](https://img.shields.io/badge/Github-leetcode--badge-blueviolet)](https://github.com/haozibi/leetcode-badge) [![Go Report Card](https://goreportcard.com/badge/github.com/haozibi/leetcode-badge)](https://goreportcard.com/report/github.com/haozibi/leetcode-badge) [![](https://leetcode-badge.haozibi.dev/v1cn/haozibi.svg)](https://leetcode.cn/haozibi) [![](https://leetcode-badge.haozibi.dev/v1cn/ranking/haozibi.svg)](https://leetcode.cn/haozibi) [![](https://leetcode-badge.haozibi.dev/v1cn/solved/haozibi.svg)](https://leetcode.cn/haozibi) [![](https://leetcode-badge.haozibi.dev/v1cn/solved-rate/haozibi.svg)](https://leetcode.cn/haozibi) [![](https://leetcode-badge.haozibi.dev/v1cn/accepted/haozibi.svg)](https://leetcode.cn/haozibi) [![](https://leetcode-badge.haozibi.dev/v1cn/accepted-rate/haozibi.svg)](https://leetcode.cn/haozibi)

![](https://leetcode-badge.haozibi.dev/v1cn/chart/submission-calendar/stormsunshine.svg?type=past-year)
![](https://leetcode-badge.haozibi.dev/v1cn/chart/submission-calendar/stormsunshine.svg?type=past-year&color=yellow)
![](https://leetcode-badge.haozibi.dev/v1cn/chart/submission-calendar/stormsunshine.svg?type=past-year&color=blue)

![](https://leetcode-badge.haozibi.dev/v1cn/card/question-process/haozibi.svg)
![](https://leetcode-badge.haozibi.dev/v1cn/card/contest-ranking/haozibi.svg)

# leetcode 徽标

- [leetcode 徽标](#leetcode-徽标)
- [快速开始](#快速开始)
- [徽标](#徽标)
- [图表](#图表)
- [卡片](#卡片)
- [致谢](#致谢)
- [JetBrains 开源证书支持](#jetbrains-开源证书支持)

## 快速开始

1. 获取 `{LeetCode_ID}`,根据 LeetCode 获取自己的`{LeetCode_ID}`。例如 [https://leetcode.com/haozibi](https://leetcode.com/haozibi) 的 `{LeetCode_ID}` 为 **haozibi**
2. 替换 `{LeetCode_ID}`,根据自己的需求替换下面 URL 中的 `{LeetCode_ID}`

## 徽标

用户名

### 用户名

- ![](https://leetcode-badge.haozibi.dev/v1cn/haozibi.svg)
- LeetCode: `https://leetcode-badge.haozibi.dev/v1/{LeetCode_ID}.svg`
- LeetCodeCN: `https://leetcode-badge.haozibi.dev/v1cn/{LeetCode_ID}.svg`

排名

### 排名

- ![](https://leetcode-badge.haozibi.dev/v1cn/ranking/haozibi.svg)
- LeetCode: `https://leetcode-badge.haozibi.dev/v1/ranking/{LeetCode_ID}.svg`
- LeetCodeCN: `https://leetcode-badge.haozibi.dev/v1cn/ranking/{LeetCode_ID}.svg`

通过题目数/总题目数

### 通过题目数/总题目数

- ![](https://leetcode-badge.haozibi.dev/v1cn/solved/haozibi.svg)
- LeetCode: `https://leetcode-badge.haozibi.dev/v1/solved/{LeetCode_ID}.svg`
- LeetCodeCN: `https://leetcode-badge.haozibi.dev/v1cn/solved/{LeetCode_ID}.svg`

通过题目数/总题目数 比例

### 通过题目数/总题目数 比例

- ![](https://leetcode-badge.haozibi.dev/v1cn/solved-rate/haozibi.svg)
- LeetCode: `https://leetcode-badge.haozibi.dev/v1/solved-rate/{LeetCode_ID}.svg`
- LeetCodeCN: `https://leetcode-badge.haozibi.dev/v1cn/solved-rate/{LeetCode_ID}.svg`

通过提交/总提交

### 通过提交/总提交

- ![](https://leetcode-badge.haozibi.dev/v1cn/accepted/haozibi.svg)
- LeetCode: `https://leetcode-badge.haozibi.dev/v1/accepted/{LeetCode_ID}.svg`
- LeetCodeCN: `https://leetcode-badge.haozibi.dev/v1cn/accepted/{LeetCode_ID}.svg`

通过提交/总提交 比例

### 通过提交/总提交 比例

- ![](https://leetcode-badge.haozibi.dev/v1cn/accepted-rate/haozibi.svg)
- LeetCode: `https://leetcode-badge.haozibi.dev/v1/accepted-rate/{LeetCode_ID}.svg`
- LeetCodeCN: `https://leetcode-badge.haozibi.dev/v1cn/accepted-rate/{LeetCode_ID}.svg`

自定义

### 自定义

此项目依托 [shields.io](https://shields.io),支持所有 shields 的 Query 参数

例如:

- ![](https://leetcode-badge.haozibi.dev/v1cn/ranking/haozibi.svg?logo=leetcode) `https://leetcode-badge.haozibi.dev/v1cn/ranking/haozibi.svg?logo=leetcode`
- ![](https://leetcode-badge.haozibi.dev/v1cn/ranking/haozibi.svg?color=ff5983&logo=leetcode) `https://leetcode-badge.haozibi.dev/v1cn/ranking/haozibi.svg?color=ff5983&logo=leetcode`
- ![](https://leetcode-badge.haozibi.dev/v1cn/ranking/haozibi.svg?style=for-the-badge&color=ff5983&logo=leetcode) `https://leetcode-badge.haozibi.dev/v1cn/ranking/haozibi.svg?style=for-the-badge&color=ff5983&logo=leetcode`

更多 logo 可以查看 [simpleicons.org](https://simpleicons.org/) 或者 [https://github.com/simple-icons/simple-icons/blob/develop/slugs.md](https://github.com/simple-icons/simple-icons/blob/develop/slugs.md)

## 图表

做题记录

### 做题记录

![](https://leetcode-badge.haozibi.dev/v1cn/chart/submission-calendar/haozibi.svg)
- LeetCodeCN: `https://leetcode-badge.haozibi.dev/v1cn/chart/submission-calendar/{LeetCode_ID}.svg?type=past-year&color=yellow`

参数

- type: 范围
- 默认: 今年
- past-year: 过去一年
- color: 颜色
- green(默认)
- yellow
- blue

注意事项:

1. 暂时只支持中国区
2. 只有开启了 LeetCode 的 **`设置-通知与隐私-显示我的提交记录`** 选项才支持此功能

排名记录图表

### 排名记录图表

![](https://leetcode-badge.haozibi.dev/v1cn/chart/ranking/haozibi.svg)

- LeetCode: `https://leetcode-badge.haozibi.dev/v1/chart/ranking/{LeetCode_ID}.svg`
- LeetCodeCN: `https://leetcode-badge.haozibi.dev/v1cn/chart/ranking/{LeetCode_ID}.svg`

支持 `day` 参数,指定查询天数,最大查询日期为 30 天

例如: 查询之前 15 天的数据,https://leetcode-badge.haozibi.dev/v1cn/chart/ranking/haozibi.svg?day=15

答题数量图表

### 答题数量图表

![](https://leetcode-badge.haozibi.dev/v1cn/chart/solved/haozibi.svg)

- LeetCode: `https://leetcode-badge.haozibi.dev/v1/chart/solved/{LeetCode_ID}.svg`
- LeetCodeCN: `https://leetcode-badge.haozibi.dev/v1cn/chart/solved/{LeetCode_ID}.svg`

支持 `day` 参数,指定查询天数,最大查询日期为 30 天

例如: 查询之前 15 天的数据,https://leetcode-badge.haozibi.dev/v1cn/chart/solved/haozibi.svg?day=15

## 卡片

*还需要对模版做美化*

展示支持多种语言,参数 `?lang=en`

- zh: 中文(默认值)
- en: 英文

做题进度

### 做题进度

**只有中国区**

![](https://leetcode-badge.haozibi.dev/v1cn/card/question-process/haozibi.svg)

- LeetCodeCN: `https://leetcode-badge.haozibi.dev/v1cn/card/question-process/{LeetCode_ID}.svg?lang=en`

竞赛信息

### 竞赛信息

**只有中国区**

![](https://leetcode-badge.haozibi.dev/v1cn/card/contest-ranking/haozibi.svg)

- LeetCodeCN: `https://leetcode-badge.haozibi.dev/v1cn/card/contest-ranking/{LeetCode_ID}.svg`

## 致谢

- [Picas](https://github.com/djyde/Picas): logo 生成
- [shields.io](https://shields.io): badge 生成

## JetBrains 开源证书支持

[![](static/jetbrains.svg)](https://www.jetbrains.com/?from=leetcode-badge)