Skip to content

Commit 015c9c3

Browse files
committed
some comments
1 parent e37f384 commit 015c9c3

23 files changed

+411
-9
lines changed

src/main/java/in/rahulojha/leetcodeapi/controller/problemsetpage/LeetCodeProblemSetPageController.java

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
package in.rahulojha.leetcodeapi.controller.problemsetpage;
22

3+
import in.rahulojha.leetcodeapi.entity.ProblemsStudyPlanAds;
34
import in.rahulojha.leetcodeapi.entity.QuestionMetaData;
45
import in.rahulojha.leetcodeapi.entity.RequestParamsDTO;
6+
import in.rahulojha.leetcodeapi.entity.SiteAnnouncement;
57
import in.rahulojha.leetcodeapi.service.LeetCodeService;
68
import lombok.NonNull;
79
import lombok.RequiredArgsConstructor;
@@ -32,4 +34,19 @@ ResponseEntity<List<QuestionMetaData>> getProblemsetQuestions(@RequestBody Reque
3234
requestParams.limit(),
3335
requestParams.filters()));
3436
}
37+
38+
// controller for site-announcements
39+
40+
@GetMapping("/site-announcements")
41+
ResponseEntity<SiteAnnouncement> getSiteAnnouncements() {
42+
return ResponseEntity.ok(leetCodeService.getSiteAnnouncements());
43+
}
44+
45+
46+
//controller for problemsetstudyplan
47+
48+
@GetMapping("/problemset-study-plan")
49+
ResponseEntity<List<ProblemsStudyPlanAds>> getProblemsetStudyPlan() {
50+
return ResponseEntity.ok(leetCodeService.getProblemsetStudyPlan());
51+
}
3552
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package in.rahulojha.leetcodeapi.entity;
2+
3+
public record CodingChallengeMedal(
4+
String name,
5+
Config config
6+
) {
7+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
package in.rahulojha.leetcodeapi.entity;
2+
3+
public record Config(
4+
String icon
5+
) {
6+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
package in.rahulojha.leetcodeapi.entity;
2+
3+
public record CurrentTimestamp(
4+
long currentTimestamp
5+
) {
6+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
package in.rahulojha.leetcodeapi.entity;
2+
3+
import java.util.Date;
4+
5+
public record DailyCodingChallengeQuestion(
6+
Date date,
7+
String userStatus,
8+
String link,
9+
QuestionMetaData question
10+
) {
11+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
package in.rahulojha.leetcodeapi.entity;
2+
3+
import java.util.List;
4+
5+
public record DailyCodingChallengeRecord(
6+
List<DailyCodingChallengeQuestion> challenges,
7+
List<DailyCodingChallengeQuestion> weeklyChallenges
8+
) {
9+
10+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
package in.rahulojha.leetcodeapi.entity;
2+
3+
import java.util.List;
4+
5+
public record MyStudyPlan(
6+
boolean hasMore,
7+
long total,
8+
List<StudyPlan> planUserProgress
9+
) {
10+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
package in.rahulojha.leetcodeapi.entity;
2+
3+
public record ProblemsStudyPlanAds(
4+
String cover,
5+
String highlight,
6+
String name,
7+
boolean onGoing,
8+
boolean premiumOnly,
9+
long questionNum,
10+
String slug
11+
) {
12+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
package in.rahulojha.leetcodeapi.entity;
2+
3+
import java.util.List;
4+
5+
public record Question(
6+
double acRate,
7+
String difficulty,
8+
String freqBar,
9+
String frontendQuestionId,
10+
boolean isFavor,
11+
boolean paidOnly,
12+
String status,
13+
String title,
14+
String titleSlug,
15+
boolean hasVideoSolution,
16+
boolean hasSolution,
17+
List<TopicTag> topicTags
18+
) {
19+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package in.rahulojha.leetcodeapi.entity;
2+
3+
public record QuestionCount(
4+
String difficulty,
5+
long count
6+
) {
7+
}

0 commit comments

Comments
 (0)