@@ -57,46 +57,61 @@ async function queryLeetCodeAPI(query: string, variables: any) {
57
57
58
58
app . get ( '/' , ( _req , res ) => {
59
59
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-' ,
60
64
routes : {
61
65
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' ,
71
78
'/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' ,
74
81
'/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' ,
77
84
} ,
78
85
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' ,
80
90
} ,
81
91
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' ,
85
97
} ,
86
98
problems : {
99
+ description :
100
+ 'Endpoints for fetching problem-related data, including lists, details, and solutions.' ,
101
+ Method : 'GET' ,
87
102
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' ,
91
106
} ,
92
107
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' ,
96
111
'/problems?tags=array+math+string&limit=5' :
97
- 'get list some problems on selected topics' ,
112
+ 'Get list some problems on selected topics' ,
98
113
'/officialSolution?titleSlug=two-sum' :
99
- 'get official solution of selected problem' ,
114
+ 'Get official solution of selected problem' ,
100
115
} ,
101
116
} ,
102
117
} ,
0 commit comments