-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathAdminFeedApi.java
More file actions
59 lines (54 loc) · 3.61 KB
/
AdminFeedApi.java
File metadata and controls
59 lines (54 loc) · 3.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
package ddingdong.ddingdongBE.domain.feed.api;
import ddingdong.ddingdongBE.domain.feed.controller.dto.response.AdminClubFeedRankingResponse;
import ddingdong.ddingdongBE.domain.feed.controller.dto.response.AdminFeedRankingWinnerResponse;
import ddingdong.ddingdongBE.domain.feed.controller.dto.response.ClubMonthlyStatusResponse;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.media.ArraySchema;
import io.swagger.v3.oas.annotations.media.Content;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.responses.ApiResponse;
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.validation.constraints.Max;
import jakarta.validation.constraints.Min;
import java.util.List;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseStatus;
@Tag(name = "Feed - Admin", description = "Feed Admin API")
@RequestMapping("/server/admin")
public interface AdminFeedApi {
@Operation(summary = "총동연 월별 1위 동아리 목록 조회 API")
@ApiResponse(responseCode = "200", description = "월별 1위 동아리 목록 조회 성공",
content = @Content(array = @ArraySchema(schema = @Schema(implementation = AdminFeedRankingWinnerResponse.class))))
@ResponseStatus(HttpStatus.OK)
@SecurityRequirement(name = "AccessToken")
@GetMapping("/feeds/ranking/last")
List<AdminFeedRankingWinnerResponse> getMonthlyWinners(
@RequestParam("year") @Min(value = 2000, message = "year는 2000 이상이어야 합니다.") @Max(value = 2100, message = "year는 2100 이하여야 합니다.") int year
);
@Operation(summary = "총동연 피드 랭킹 조회 API")
@ApiResponse(responseCode = "200", description = "동아리별 피드 랭킹 조회 성공",
content = @Content(array = @ArraySchema(schema = @Schema(implementation = AdminClubFeedRankingResponse.class))))
@ResponseStatus(HttpStatus.OK)
@SecurityRequirement(name = "AccessToken")
@GetMapping("/feeds/ranking")
List<AdminClubFeedRankingResponse> getClubFeedRanking(
@RequestParam("year") @Min(value = 2000, message = "year는 2000 이상이어야 합니다.") @Max(value = 2100, message = "year는 2100 이하여야 합니다.") int year,
@RequestParam("month") @Min(value = 1, message = "month는 1 이상이어야 합니다.") @Max(value = 12, message = "month는 12 이하여야 합니다.") int month
);
@Operation(summary = "총동연 동아리 이달의 현황 조회 API")
@ApiResponse(responseCode = "200", description = "동아리 이달의 현황 조회 성공",
content = @Content(schema = @Schema(implementation = ClubMonthlyStatusResponse.class)))
@ResponseStatus(HttpStatus.OK)
@SecurityRequirement(name = "AccessToken")
@GetMapping("/clubs/{clubId}/feeds/ranking/status")
ClubMonthlyStatusResponse getClubMonthlyStatus(
@PathVariable("clubId") Long clubId,
@RequestParam("year") @Min(value = 2000, message = "year는 2000 이상이어야 합니다.") @Max(value = 2100, message = "year는 2100 이하여야 합니다.") int year,
@RequestParam("month") @Min(value = 1, message = "month는 1 이상이어야 합니다.") @Max(value = 12, message = "month는 12 이하여야 합니다.") int month
);
}