8000 Merge pull request #38 from 123xylem/add_description_formatting_to_do… · alfaarghya/alfa-leetcode-api@4d42cda · GitHub
[go: up one dir, main page]

Skip to content

Commit 4d42cda

Browse files
authored
Merge pull request #38 from 123xylem/add_description_formatting_to_domain_api_documentation
Add Descriptions and Methods to API route documentation.
2 parents 4ed7358 + 86c77c9 commit 4d42cda

File tree

1 file changed

+40
-25
lines changed

1 file changed

+40
-25
lines changed

src/app.ts

Lines changed: 40 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -57,46 +57,61 @@ async function queryLeetCodeAPI(query: string, variables: any) {
5757

5858
app.get('/', (_req, res) => {
5959
res.json({
60+
apiOverview:
61+
'Welcome to the Alfa-Leetcode-API! Alfa-Leetcode-Api is a custom solution born out of the need for a well-documented and detailed LeetCode API. This project is designed to provide developers with endpoints that offer insights into a user"s profile, badges, solved questions, contest details, contest history, submissions, and also daily questions, selected problem, list of problems.',
62+
apiEndpointsLink:
63+
'https://github.com/alfaarghya/alfa-leetcode-api?tab=readme-ov-file#endpoints-',
6064
routes: {
6165
userDetails: {
62-
'/:username': 'get your leetcodevis profile Details',
63-
'/:username/badges': 'get your badges',
64-
'/:username/solved': 'get total number of question you solved',
65-
'/:username/contest': 'get your contest details',
66-
'/:username/contest/history': 'get all contest history',
67-
'/:username/submission': 'get your last 20 submission',
68-
'/:username/acSubmission': 'get your last 20 accepted submission',
69-
'/:username/calendar': 'get your submission calendar',
70-
'/userProfile/:username': 'get full profile details in one call',
66+
description:
67+
'Endpoints for retrieving detailed user profile information on Leetcode.',
68+
Method: 'GET',
69+
'/:username': 'Get your leetcodevis profile Details',
70+
'/:username/badges': 'Get your badges',
71+
'/:username/solved': 'Get total number of question you solved',
72+
'/:username/ 8000 contest': 'Get your contest details',
73+
'/:username/contest/history': 'Get all contest history',
74+
'/:username/submission': 'Get your last 20 submission',
75+
'/:username/acSubmission': 'Get your last 20 accepted submission',
76+
'/:username/calendar': 'Get your submission calendar',
77+
'/userProfile/:username': 'Get full profile details in one call',
7178
'/userProfileCalendar?username=yourname&year=2024':
72-
'get your calendar details with year',
73-
'/languageStats?username=yourname': 'get the language stats of a user',
79+
'Get your calendar details with year',
80+
'/languageStats?username=yourname': 'Get the language stats of a user',
7481
'/userProfileUserQuestionProgressV2/:userSlug':
75-
'get your question progress',
76-
'/skillStats/:username': 'get your skill stats',
82+
'Get your question progress',
83+
'/skillStats/:username': 'Get your skill stats',
7784
},
7885
contest: {
79-
'/userContestRankingInfo/:username': 'get user contest ranking info',
86+
description:
87+
'Endpoints for retrieving contest ranking and performance data.',
88+
Method: 'GET',
89+
'/userContestRankingInfo/:username': 'Get user contest ranking info',
8090
},
8191
discussion: {
82-
'/trendingDiscuss?first=20': 'get top 20 trending discussions',
83-
'/discussTopic/:topicId': 'get discussion topic',
84-
'/discussComments/:topicId': 'get discussion comments',
92+
description: 'Endpoints for fetching discussion topics and comments.',
93+
Method: 'GET',
94+
'/trendingDiscuss?first=20': 'Get top 20 trending discussions',
95+
'/discussTopic/:topicId': 'Get discussion topic',
96+
'/discussComments/:topicId': 'Get discussion comments',
8597
},
8698
problems: {
99+
description:
100+
'Endpoints for fetching problem-related data, including lists, details, and solutions.',
101+
Method: 'GET',
87102
singleProblem: {
88-
'/select?titleSlug=two-sum': 'get selected Problem',
89-
'/daily': 'get daily Problem',
90-
'/dailyQuestion': 'get raw daily question',
103+
'/select?titleSlug=two-sum': 'Get selected Problem',
104+
'/daily': 'Get daily Problem',
105+
'/dailyQuestion': 'Get raw daily question',
91106
},
92107
problemList: {
93-
'/problems': 'get list of 20 problems',
94-
'/problems?limit=50': 'get list of some problems',
95-
'/problems?tags=array+math': 'get list problems on selected topics',
108+
'/problems': 'Get list of 20 problems',
109+
'/problems?limit=50': 'Get list of some problems',
110+
'/problems?tags=array+math': 'Get list problems on selected topics',
96111
'/problems?tags=array+math+string&limit=5':
97-
'get list some problems on selected topics',
112+
'Get list some problems on selected topics',
98113
'/officialSolution?titleSlug=two-sum':
99-
'get official solution of selected problem',
114+
'Get official solution of selected problem',
100115
},
101116
},
102117
},

0 commit comments

Comments
 (0)
0