Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

내가 업로드한 노래 3개 가져오기 #214

Merged
merged 4 commits into from
Nov 29, 2023
Merged

Conversation

HamBP
Copy link
Member

@HamBP HamBP commented Nov 28, 2023

Issue

Overview

  • 마이 페이지에서 내가 업로드한 노래를 가져온다.

Screenshot

@HamBP HamBP added ✨ feat 기능 개발 🤖 android android labels Nov 28, 2023
@HamBP HamBP added this to the 👋 my milestone Nov 28, 2023
@HamBP HamBP self-assigned this Nov 28, 2023
@HamBP HamBP linked an issue Nov 28, 2023 that may be closed by this pull request
Copy link

github-actions bot commented Nov 28, 2023

Test Results

4 tests   4 ✔️  1s ⏱️
1 suites  0 💤
1 files    0

Results for commit 1277629.

♻️ This comment has been updated with latest results.

Copy link
Collaborator

@2taezeat 2taezeat left a comment

Choose a reason for hiding this comment

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

고생하셨습니다~

@@ -20,4 +20,6 @@ interface MusicApi {
@GET("musics/recent-uploads")
suspend fun getRecentUploads(): List<MusicResponse>

@GET("musics/my-uploads")
suspend fun getMyUploads(): List<MusicResponse>
Copy link
Collaborator

@2taezeat 2taezeat Nov 28, 2023

Choose a reason for hiding this comment

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

getMyUploads 는 함수명 치고, 너무 추상적인 거 같은데 getMyUploadedMusics 가 어떠신가요?

Copy link
Collaborator

Choose a reason for hiding this comment

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

getRecentUploads 도 마찬가지 맥락입니다~

Copy link
Member Author

Choose a reason for hiding this comment

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

데이터 레이어에 대한 추상화는 repository에서 이루어져서, 여기서는 서버를 그대로 반영하려고 했어!

Comment on lines 59 to 61
it.copy(
myMusics = response.take(3)
)
Copy link
Collaborator

@2taezeat 2taezeat Nov 28, 2023

Choose a reason for hiding this comment

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

마이너 한데,
it.copy( myMusics = response.take(3) )
로 idenet 줄일 수 있으면 좋을 거 같아요 (가능하다면)

Copy link
Member

@youlalala youlalala left a comment

Choose a reason for hiding this comment

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

코멘트 이외에는 의견 없습니당! 고생하셨어용~~ 굳굳 👏🏻

Comment on lines +18 to +26
return Music(
id = musicId,
title = title,
artist = user.nickname,
imageUrl = cover
)
}
}
Copy link
Member

Choose a reason for hiding this comment

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

요 부분 슬랙에도 말했는데 domain model 에서 data model로 변환할 때는 domain 이 data를 몰라서 클래스안에 멤버 함수로 둘 수가 없게 돼!! 그래서 두가지 방식을 일관성 있게 처리할라면 이 멤버 함수도 internal 확장함수로 두어야할 것 같아용

Copy link
Member Author

Choose a reason for hiding this comment

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

나는 그래도 멤버함수파이긴 한데, 이거는 일단 머지해 놓고 다시 고민해볼게


private fun fetchMyMusics() {
musicRepository.getMyMusics()
.onEach { response ->
Copy link
Member

Choose a reason for hiding this comment

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

response 보다는 musics 로 하는게 어떨까??? response 는 데이터 레이어와 관련된 것 같은 느낌이 들어서!!!

@HamBP HamBP merged commit 984b100 into develop Nov 29, 2023
2 checks passed
@HamBP HamBP deleted the android/feature/27 branch November 30, 2023 12:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🤖 android android ✨ feat 기능 개발
Projects
None yet
Development

Successfully merging this pull request may close these issues.

내가 업로드한 노래 3개 가져오기
3 participants