Skip to content

Commit d5a9fe6

Browse files
committed
update: docs
1 parent c1e9776 commit d5a9fe6

File tree

2 files changed

+43
-44
lines changed

2 files changed

+43
-44
lines changed

README.md

Lines changed: 32 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,20 @@
11
<h1 align="center">alfa-leetcode-api</h1>
2-
<div align="center">
32

4-
### The API for retrieving your LeetCode profile & Problems statistics
3+
<p align="center">
4+
<strong>The API for retrieving your LeetCode profile & Problems statistics</strong>
5+
</p>
56

6-
<img src="https://img.shields.io/badge/License-MIT-green.svg"/>
7-
<img src="https://img.shields.io/npm/v/npm.svg?logo=nodedotjs"/>
7+
<p align="center">
8+
<img src="https://img.shields.io/badge/License-MIT-green.svg"/>
9+
<img src="https://img.shields.io/npm/v/npm.svg?logo=nodedotjs"/>
10+
</p>
811

9-
![TypeScript](https://img.shields.io/badge/typetscript-%2320232a.svg?style=for-the-badge&logo=typescript&logoColor=%fff)
10-
![Node.js](https://img.shields.io/badge/Node.js-%2320232a?style=for-the-badge&logo=node.js&logoColor=43853D)
11-
![Express.js](https://img.shields.io/badge/express-%2320232a.svg?style=for-the-badge&logo=express&logoColor=%23F7DF1E)
12-
![REST API](https://img.shields.io/badge/RestApi-%2320232a.svg?style=for-the-badge&logo=restAPI&logoColor=%23F7DF1E)
13-
14-
</div>
12+
<p align="center">
13+
<img src="https://img.shields.io/badge/typetscript-%2320232a.svg?style=for-the-badge&logo=typescript&logoColor=%fff"/>
14+
<img src="https://img.shields.io/badge/Node.js-%2320232a?style=for-the-badge&logo=node.js&logoColor=43853D"/>
15+
<img src="https://img.shields.io/badge/express-%2320232a.svg?style=for-the-badge&logo=express&logoColor=%23F7DF1E"/>
16+
<img src="https://img.shields.io/badge/RestApi-%2320232a.svg?style=for-the-badge&logo=restAPI&logoColor=%23F7DF1E"/>
17+
</p>
1518

1619
## About ✨
1720

@@ -28,7 +31,7 @@ https://alfa-leetcode-api.onrender.com/
2831
## Run with docker 🐳
2932

3033
```
31-
docker run -p 3000:3000 alfaarghya/alfa-leetcode-api:2.0.1
34+
docker run -p 3000:3000 alfaarghya/alfa-leetcode-api
3235
```
3336

3437
## Wanna Contribute 🤔??
@@ -50,38 +53,29 @@ During development, it's recommended to utilize the API locally. To do so, follo
5053
| Details | Endpoint | Description | Demo |
5154
| :---------------------------- | :----------------------------------- | :------------------------------------------------------------------- | ----------------------------------------------------------------- |
5255
| _Profile_ | `/:username` | Get details about a user's profile. | <a href="./public/demo/demo2.png" target="_blank">click here</a> |
56+
| _Full Profile_ | `/:username/profile` | Get full profile details in one call | TODO |
5357
| _Badges_ | `/:username/badges` | Get the badges earned by the user. | <a href="./public/demo/demo3.png" target="_blank">click here</a> |
5458
| _Solved_ | `/:username/solved` | Get the total number of questions solved by the user. | <a href="./public/demo/demo4.png" target="_blank">click here</a> |
5559
| _Contest_ | `/:username/contest` | Get details about the user's contest participation. | <a href="./public/demo/demo5.png" target="_blank">click here</a> |
56-
| _Contest History_ | `/:username/contest/history` | Get contest history. | <a href="./public/demo/demo6.png" target="_blank">click here</a> |
60+
| _Contest History_ | `/:username/contest/history` | Get all contest history. | <a href="./public/demo/demo6.png" target="_blank">click here</a> |
5761
| _Submission_ | `/:username/submission` | Get the last 20 submissions of the user. | <a href="./public/demo/demo7.png" target="_blank">click here</a> |
5862
| _Limited Submission_ | `/:username/submission?limit=number` | Get a specified **_number_** of the user's last submissions. | <a href="./public/demo/demo8.png" target="_blank">click here</a> |
5963
| _Accepted Submission_ | `/:username/acSubmission` | Get the last 20 accepted submission of the user. | <a href="./public/demo/demo16.png" target="_blank">click here</a> |
6064
| _Limited Accepted Submission_ | `/:username/acSubmission?limit=7` | Get a specified **_number_** of the user's last accepted submission. | <a href="./public/demo/demo17.png" target="_blank">click here</a> |
6165
| _Calendar_ | `/:username/calendar` | Get the user's submission calendar. | <a href="./public/demo/demo9.png" target="_blank">click here</a> |
62-
63-
### 😀 New Endpoints 🎉
64-
65-
| Details | Endpoint | Description |
66-
| :--------------------- | :------------------------------------------------- | :----------------------------------- |
67-
| _Full Profile_ | `/userProfile/:username` | get full profile details in one call |
68-
| _Year Calender_ | `/userProfileCalendar?username=yourname&year=2024` | get your calendar details with year |
69-
| _Lang Stats_ | `/languageStats?username=yourname` | get the language stats of a user |
70-
| _Question Progress_ | `/userProfileUserQuestionProgressV2/:userSlug` | get your question progress |
71-
| _Skill Stats_ | `/skillStats/:username` | get your skill stats |
72-
| _User Contest Ranking_ | `/userContestRankingInfo/:username` | get contest ranking |
73-
| _Trending Discussion_ | `/trendingDiscuss?first=20` | get top 20 trending discussions |
74-
| _Discussion Topic_ | `/discussTopic/:topicId` | get discussion topic |
75-
| _Discussion Comment_ | `/discussComments/:topicId` | get discussion comments |
76-
| _Raw Daily Problem_ | `/dailyQuestion` | get raw daily question |
77-
| _Raw Selected Problem_ | `/selectQuestion?titleSlug=selected-question` | get raw selected question |
66+
| _Calendar with year_ | `/:username/calendar?year=2025` | Get the user's submission calendar with `year` query | TODO |
67+
| _Skill Stats_ | `/:username/skill` | Get the user's skill stats. | TODO |
68+
| _Lang Stats_ | `/:username/language` | get the language stats of a user | TODO |
69+
| _Question Progress_ | `/:username/progress` | get your question progress | TODO |
7870

7971
### ❓Questions Details
8072

8173
| Details | Endpoint | Description | Demo |
8274
| :--------------------------------- | :------------------------------------------------------- | :--------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------- |
8375
| _Daily Problem_ | `/daily` | Get the daily question. | <a href="./public/demo/demo10.png" target="_blank">click here</a> |
76+
| _Daily Problem Raw_ | `/daily/raw` | Get the daily question in raw. | TODO |
8477
| _Selected Problem_ | `/select?titleSlug=selected-question` | Get details about a **_selected-question_**. | <a href="./public/demo/demo11.png" target="_blank">click here</a> |
78+
| _Raw Selected Problem_ | `/select/raw?titleSlug=selected-question` | Get raw selected question | TODO |
8579
| _Problems_ | `/problems` | Get a list of 20 problems. | <a href="./public/demo/demo12.png" target="_blank">click here</a> |
8680
| _Limited Problems_ | `/problems?limit=number` | Get a list of a specified **_number_** of problems. | <a href="./public/demo/demo13.png" target="_blank">click here</a> |
8781
| _Filter Problems_ | `/problems?tags=tag1+tag2` | Get a list of problems based on selected **_tags_**. | <a href="./public/demo/demo14.png" target="_blank">click here</a> |
@@ -90,6 +84,15 @@ During development, it's recommended to utilize the API locally. To do so, follo
9084
| _Filter & Limited Problems_ | `/problems?tags=tag1+tag2+tag3&limit=number` | Get a list of a specified **_number_** of problems based on selected **_tags_**. | <a href="./public/demo/demo15.png" target="_blank">click here</a> |
9185
| _Skip & Limited Problems_ | `/problems?limit=number&skip=number` | Get a list of a specified **_number_** of problems skipping a specified **number** of problems. | <a href="./public/demo/demo20.png" target="_blank">click here</a> |
9286
| _Skip & Filter & Limited Problems_ | `/problems?tags=tag1+tag2+tag3&limit=number&skip=number` | Get a list of a specified **_number_** of problems based on selected **_tags_** skipping a specified **number** of problems. | <a href="./public/demo/demo21.png" target="_blank">click here</a> |
87+
| _Official Solution_ | `/officialSolution?titleSlug=selected-question` | Get Get the official solution(leetcode) for a question | TODO |
88+
89+
### Discussion
90+
91+
| Details | Endpoint | Description |
92+
| :-------------------- | :-------------------------- | :------------------------------ |
93+
| _Trending Discussion_ | `/trendingDiscuss?first=20` | get top 20 trending discussions |
94+
| _Discussion Topic_ | `/discussTopic/:topicId` | get discussion topic |
95+
| _Discussion Comment_ | `/discussComments/:topicId` | get discussion comments |
9396

9497
## Author ✒️
9598

@@ -108,7 +111,7 @@ During development, it's recommended to utilize the API locally. To do so, follo
108111
| [@theinit01](https://github.com/theinit01) | Temp fix for skip |
109112
| [@123xylem](https://github.com/123xylem) | Add Descriptions and Methods to API route documentation. |
110113
| [@P-M-Manmohan](https://github.com/P-M-Manmohan) | Added filtering based on difficulty |
111-
| [@Ahmed-Armaan](https://github.com/Ahmed-Armaan) | Update DOCS example. Update function: set limit 20 if it's undefined |
114+
| [@Ahmed-Armaan](https://github.com/Ahmed-Armaan) | Update DOCS example with images |
112115

113116
## Connect with me 📲
114117

src/app.ts

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -35,27 +35,22 @@ app.get('/', (_req, res) => {
3535
description:
3636
'Endpoints for retrieving detailed user profile information on Leetcode.',
3737
Method: 'GET',
38-
'/:username': 'Get your leetcodevis profile Details',
38+
'/:username': 'Get your leetcode profile Details',
39+
'/:username/profile': 'Get full profile details',
3940
'/:username/badges': 'Get your badges',
4041
'/:username/solved': 'Get total number of question you solved',
4142
'/:username/contest': 'Get your contest details',
4243
'/:username/contest/history': 'Get all contest history',
4344
'/:username/submission': 'Get your last 20 submission',
45+
'/:username/submission?limit=7': 'Get a specified number of last submissions.',
4446
'/:username/acSubmission': 'Get your last 20 accepted submission',
47+
'/:username/acSubmission?limit=7': 'Get a specified number of last acSubmissions.',
4548
'/:username/calendar': 'Get your submission calendar',
46-
'/userProfile/:username': 'Get full profile details in one call',
47-
'/userProfileCalendar?username=yourname&year=2024':
48-
'Get your calendar details with year',
49-
'/languageStats?username=yourname': 'Get the language stats of a user',
50-
'/userProfileUserQuestionProgressV2/:userSlug':
51-
'Get your question progress',
52-
'/skillStats/:username': 'Get your skill stats',
53-
},
54-
contest: {
55-
description:
56-
'Endpoints for retrieving contest ranking and performance data.',
57-
Method: 'GET',
58-
'/userContestRankingInfo/:username': 'Get user contest ranking info',
49+
'/:username/calendar?year=2025': 'Get your year submission calendar',
50+
'/:username/skill': 'Get your skill stats',
51+
'/:username/language': 'Get your language stats',
52+
'/:username/progress': 'Get your progress stats',
53+
5954
},
6055
discussion: {
6156
description: 'Endpoints for fetching discussion topics and comments.',
@@ -70,8 +65,9 @@ app.get('/', (_req, res) => {
7065
Method: 'GET',
7166
singleProblem: {
7267
'/select?titleSlug=two-sum': 'Get selected Problem',
68+
'/select/raw?titleSlug=two-sum': 'Get raw selected Problem',
7369
'/daily': 'Get daily Problem',
74-
'/dailyQuestion': 'Get raw daily question',
70+
'/daily/raw': 'Get raw daily Problem',
7571
},
7672
problemList: {
7773
'/problems': 'Get list of 20 problems',

0 commit comments

Comments
 (0)