Skip to content

[Feature/#59] 마이페이지 유저 프로필 API 연동#60

Merged
wjdrjs00 merged 3 commits intodevelopfrom
feature/#59-mypage-profile-api
Jul 30, 2025
Merged

[Feature/#59] 마이페이지 유저 프로필 API 연동#60
wjdrjs00 merged 3 commits intodevelopfrom
feature/#59-mypage-profile-api

Conversation

@wjdrjs00
Copy link
Copy Markdown
Member

@wjdrjs00 wjdrjs00 commented Jul 30, 2025

[ PR Content ]

마이페이지 화면 유저 프로필 API를 연동했습니다.
추가로 변경사항이 있는 API 엔드포인트(유저프로필, 감정구슬)를 수정했습니다.

Related issue

Screenshot 📸

  • N/A

Work Description

  • 마이페이지 유저 프로필 조회 API 연동
  • 유저프로필, 감정구슬 조회 API 엔드포인드 수정

To Reviewers 📢

  • 간단한 작업이라 없슴다~!

Summary by CodeRabbit

  • 신규 기능

    • 마이페이지 정보 로드시 사용자 프로필을 동적으로 불러오도록 개선되었습니다.
  • 버그 수정

    • 감정 구슬 조회 시 날짜 파라미터가 쿼리에서 경로 파라미터로 변경되어 요청 방식이 수정되었습니다.
    • 사용자 프로필 조회 엔드포인트가 변경되었습니다.

@wjdrjs00 wjdrjs00 requested a review from l5x5l July 30, 2025 08:27
@wjdrjs00 wjdrjs00 self-assigned this Jul 30, 2025
@wjdrjs00 wjdrjs00 added ✨ Feature 새로운 기능 구현 🐞 Fix 버그 수정 🧤 대현 labels Jul 30, 2025
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Jul 30, 2025

Walkthrough

EmotionService와 UserService의 API 엔드포인트가 변경되었으며, MyPageViewModel에서는 유저 프로필 정보를 동적으로 불러오도록 로직이 수정되었습니다. 각 서비스의 Retrofit 어노테이션 및 파라미터 처리 방식도 이에 맞게 조정되었습니다.

Changes

Cohort / File(s) Change Summary
EmotionService 엔드포인트 및 파라미터 변경
data/src/main/java/com/threegap/bitnagil/data/emotion/service/EmotionService.kt
감정 구슬 조회 API의 엔드포인트가 /api/v1/emotion-marbles/me?searchDate=...에서 /api/v1/emotion-marbles/{searchDate}로 변경되고, @Query에서 @Path 파라미터로 전환됨.
UserService 엔드포인트 변경
data/src/main/java/com/threegap/bitnagil/data/user/service/UserService.kt
유저 프로필 조회 API 엔드포인트가 /api/v1/users/nickname에서 /api/v1/users/infos로 변경됨.
마이페이지 ViewModel 유저 프로필 연동
presentation/src/main/java/com/threegap/bitnagil/presentation/mypage/MyPageViewModel.kt
ViewModel에서 유저 프로필 정보를 직접 하드코딩하지 않고, FetchUserProfileUseCase를 통해 동적으로 불러오도록 로직 변경 및 의존성 주입 추가.

Sequence Diagram(s)

sequenceDiagram
    participant ViewModel as MyPageViewModel
    participant UseCase as FetchUserProfileUseCase
    participant Service as UserService

    ViewModel->>UseCase: fetchUserProfileUseCase()
    UseCase->>Service: fetchUserProfile()
    Service-->>UseCase: UserProfileResponse
    UseCase-->>ViewModel: Result(UserProfile)
    ViewModel->>ViewModel: sendIntent(LoadMyPageSuccess)
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Assessment against linked issues

Objective Addressed Explanation
마이페이지 유저정보 조회 API 연동 (#59)
유저 정보 조회 API 엔드포인트 수정 (#59)
감정 구슬 조회 API 엔드포인트 수정 (#59)

Poem

🐰
API 길 따라 hop hop hop,
프로필도 구슬도 한 번에 척척!
ViewModel은 새로워졌고,
엔드포인트도 바뀌었네,
오늘도 코드는 깔끔하게,
토끼는 기쁘게 춤추네!

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/#59-mypage-profile-api

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between da4e368 and d9fbc5f.

📒 Files selected for processing (3)
  • data/src/main/java/com/threegap/bitnagil/data/emotion/service/EmotionService.kt (2 hunks)
  • data/src/main/java/com/threegap/bitnagil/data/user/service/UserService.kt (1 hunks)
  • presentation/src/main/java/com/threegap/bitnagil/presentation/mypage/MyPageViewModel.kt (3 hunks)
🧰 Additional context used
🧠 Learnings (1)
presentation/src/main/java/com/threegap/bitnagil/presentation/mypage/MyPageViewModel.kt (3)

Learnt from: l5x5l
PR: #41
File: presentation/src/main/java/com/threegap/bitnagil/presentation/mypage/model/MyPageIntent.kt:6-6
Timestamp: 2025-07-23T13:32:26.263Z
Learning: In the Bitnagil Android project's MVI architecture, Intent classes like LoadMyPageSuccess are named to represent successful API response results that carry loaded data, not just user actions. This naming convention is used for future API integration where the intent will be triggered when my page data loading succeeds from the server.

Learnt from: l5x5l
PR: #41
File: presentation/src/main/java/com/threegap/bitnagil/presentation/mypage/model/MyPageState.kt:6-14
Timestamp: 2025-07-23T13:31:46.809Z
Learning: In the Bitnagil Android project, MviState interface extends Parcelable, so any class implementing MviState automatically implements Parcelable. Therefore, @parcelize annotation works correctly without explicitly adding Parcelable implementation.

Learnt from: l5x5l
PR: #41
File: presentation/src/main/java/com/threegap/bitnagil/presentation/mypage/model/MyPageState.kt:6-14
Timestamp: 2025-07-23T13:31:46.809Z
Learning: In the Bitnagil Android project, MviState interface extends Parcelable, so any class implementing MviState automatically implements Parcelable. Therefore, @parcelize annotation works correctly without explicitly adding Parcelable implementation.

🧬 Code Graph Analysis (1)
presentation/src/main/java/com/threegap/bitnagil/presentation/mypage/MyPageViewModel.kt (1)
presentation/src/main/java/com/threegap/bitnagil/presentation/common/mviviewmodel/MviViewModel.kt (1)
  • sendIntent (30-37)
🔇 Additional comments (5)
data/src/main/java/com/threegap/bitnagil/data/user/service/UserService.kt (1)

8-8: API 엔드포인트 변경이 적절합니다.

/api/v1/users/nickname에서 /api/v1/users/infos로 변경된 것이 함수명 fetchUserProfile과 더 일관성 있고 의미적으로 명확합니다. 전체 사용자 프로필 정보를 가져온다는 의도가 잘 드러납니다.

presentation/src/main/java/com/threegap/bitnagil/presentation/mypage/MyPageViewModel.kt (2)

5-5: API 연동을 위한 UseCase 의존성 추가가 적절합니다.

하드코딩된 값에서 실제 API 호출로 변경하기 위한 FetchUserProfileUseCase 의존성 추가가 올바른 접근입니다.


18-18: UseCase 의존성 주입이 올바르게 구현되었습니다.

생성자를 통한 의존성 주입이 깔끔하게 구현되었습니다.

data/src/main/java/com/threegap/bitnagil/data/emotion/service/EmotionService.kt (2)

11-11: 필요한 import 추가가 적절합니다.

@Path 어노테이션 사용을 위한 import 추가가 올바릅니다.


22-25: getMyEmotionMarble API 경로 파라미터 변경에 따른 호환성 확인 완료

getMyEmotionMarble(currentDate: String) 호출부를 모두 점검한 결과, 경로 파라미터(@Path("searchDate"))로의 변경이 기존 호출 방식에 영향을 주지 않으므로 추가 수정이 필요 없습니다.

확인된 호출부:

  • data/src/main/java/com/threegap/bitnagil/data/emotion/repositoryImpl/EmotionRepositoryImpl.kt
  • data/src/main/java/com/threegap/bitnagil/data/emotion/datasourceImpl/EmotionDataSourceImpl.kt
  • data/src/main/java/com/threegap/bitnagil/data/emotion/service/EmotionService.kt
  • data/src/main/java/com/threegap/bitnagil/data/emotion/datasource/EmotionDataSource.kt
  • domain/src/main/java/com/threegap/bitnagil/domain/emotion/repository/EmotionRepository.kt
  • domain/src/main/java/com/threegap/bitnagil/domain/emotion/usecase/GetMyEmotionUseCase.kt

Copy link
Copy Markdown
Contributor

@l5x5l l5x5l left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

고생하셨습니다! 머지 진행하시죠!

@wjdrjs00 wjdrjs00 merged commit 997a706 into develop Jul 30, 2025
2 checks passed
@wjdrjs00 wjdrjs00 deleted the feature/#59-mypage-profile-api branch July 30, 2025 09:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

✨ Feature 새로운 기능 구현 🐞 Fix 버그 수정 🧤 대현

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] 마이페이지 유저 프로필 API 연동

2 participants