Skip to content

haozibi/leetcode-badge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

93 Commits
May 25, 2022
Sep 21, 2022
Aug 20, 2022
Mar 28, 2024
Dec 31, 2020
Oct 29, 2019
Oct 9, 2020
Aug 23, 2022
Jul 29, 2019
May 25, 2022
Apr 7, 2024
Mar 28, 2024
Aug 6, 2022
Aug 6, 2022
Feb 26, 2020
Aug 4, 2022
Aug 19, 2022

Repository files navigation

CircleCI Go Report Card

leetcode 徽标

快速开始

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

徽标

用户名

用户名

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

排名

排名

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

通过题目数/总题目数

通过题目数/总题目数

  • LeetCode: https://leetcode-badge.haozibi.dev/v1/solved/{LeetCode_ID}.svg
  • LeetCodeCN: https://leetcode-badge.haozibi.dev/v1cn/solved/{LeetCode_ID}.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

通过提交/总提交

通过提交/总提交

  • LeetCode: https://leetcode-badge.haozibi.dev/v1/accepted/{LeetCode_ID}.svg
  • LeetCodeCN: https://leetcode-badge.haozibi.dev/v1cn/accepted/{LeetCode_ID}.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,支持所有 shields 的 Query 参数

例如:

  • 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?style=for-the-badge&color=ff5983&logo=leetcode

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

图表

做题记录

做题记录

  • 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 的 设置-通知与隐私-显示我的提交记录 选项才支持此功能

排名记录图表

排名记录图表

  • 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

答题数量图表

答题数量图表

  • 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: 英文
做题进度

做题进度

只有中国区

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

竞赛信息

竞赛信息

只有中国区

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

致谢

JetBrains 开源证书支持