Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -280,4 +280,12 @@ private String formattedWithTime(LocalDateTime time) {
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm");
return time.format(formatter);
}

public List<YoutubeVideoDto> getYoutubeVideos() {
return youtubeClient.searchVideos("피부관리", 3);
}

public List<NaverProductDto> getNaverProducts() {
return naverClient.searchProducts("피부관리", 3);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -106,4 +106,16 @@ public ApplicationResponse<?> delete(@RequestParam String key) {
s3Client.deleteImage(key);
return ApplicationResponse.ok("이미지가 삭제되었습니다.");
}

@GetMapping("/main/youtube")
@Operation(summary = "[홈화면] 유튜브 영상 추천 조회", description = "홈화면의 유튜브 영상 추천을 조회합니다.")
public ApplicationResponse<?> getYoutubeRecommendationsForMainPage() {
return ApplicationResponse.ok(analysisService.getYoutubeVideos());
}

@GetMapping("/main/product")
@Operation(summary = "[홈화면] 상품 추천 조회", description = "홈화면의 상품 추천을 조회합니다.")
public ApplicationResponse<?> getProductRecommendationsForMainPage() {
return ApplicationResponse.ok(analysisService.getNaverProducts());
}
}