@@ -80,7 +80,7 @@ async def fetch_with_retry(url: str, payload: dict, retries: int = 3):
8080 await asyncio .sleep (1 )
8181 return None
8282
83- @app .get ("/problems" )
83+ @app .get ("/problems" , tags = [ "Problems" ] )
8484async def get_all_problems ():
8585 await cache .initialize ()
8686 return [{
@@ -91,7 +91,7 @@ async def get_all_problems():
9191 "url" : f"https://leetcode.com/problems/{ q ['titleSlug' ]} /"
9292 } for q in cache .questions .values ()]
9393
94- @app .get ("/problem/{id_or_slug}" )
94+ @app .get ("/problem/{id_or_slug}" , tags = [ "Problems" ] )
9595async def get_problem (id_or_slug : str ):
9696 await cache .initialize ()
9797
@@ -145,7 +145,7 @@ async def get_problem(id_or_slug: str):
145145 cache .question_details [question_id ] = question_data
146146 return question_data
147147
148- @app .get ("/problems/{topic}" )
148+ @app .get ("/problems/{topic}" , tags = [ "Problems" ] )
149149async def get_problems_by_topic (topic : str ):
150150 async with httpx .AsyncClient () as client :
151151 query = """query problemsetQuestionList($categorySlug: String, $filters: QuestionListFilterInput) {
@@ -180,7 +180,7 @@ async def get_problems_by_topic(topic: str):
180180 except Exception as e :
181181 raise HTTPException (status_code = 500 , detail = str (e ))
182182
183- @app .get ("/user/{username}" )
183+ @app .get ("/user/{username}" , tags = [ "Users" ] )
184184async def get_user_profile (username : str ):
185185 async with httpx .AsyncClient () as client :
186186 query = """query userPublicProfile($username: String!) {
@@ -228,7 +228,7 @@ async def get_user_profile(username: str):
228228 except Exception as e :
229229 raise HTTPException (status_code = 500 , detail = str (e ))
230230
231- @app .get ("/user/{username}/contests" )
231+ @app .get ("/user/{username}/contests" , tags = [ "Users" ] )
232232async def get_user_contest_history (username : str ):
233233 async with httpx .AsyncClient () as client :
234234 query = """query userContestRankingInfo($username: String!) {
@@ -267,7 +267,7 @@ async def get_user_contest_history(username: str):
267267 except Exception as e :
268268 raise HTTPException (status_code = 500 , detail = str (e ))
269269
270- @app .get ("/user/{username}/submissions" )
270+ @app .get ("/user/{username}/submissions" , tags = [ "Users" ] )
271271async def get_recent_submissions (username : str , limit : int = 20 ):
272272 async with httpx .AsyncClient () as client :
273273 query = """query recentSubmissions($username: String!, $limit: Int) {
@@ -298,7 +298,7 @@ async def get_recent_submissions(username: str, limit: int = 20):
298298 raise HTTPException (status_code = 500 , detail = str (e ))
299299
300300
301- @app .get ("/daily" )
301+ @app .get ("/daily" , tags = [ "Daily Challenge" ] )
302302async def get_daily_challenge ():
303303 async with httpx .AsyncClient () as client :
304304 query = """query questionOfToday {
0 commit comments