-
Notifications
You must be signed in to change notification settings - Fork 3
[API] 모임방 참여 이후 활동들 api 연결 #70
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
Merged
Nico1eKim
merged 23 commits into
THIP-TextHip:develop
from
Nico1eKim:api/#66-rooms_playing
Aug 8, 2025
Merged
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
679f937
[feat]: 진행중인 방 상세보기 response 생성 (#66)
Nico1eKim 26dffbd
[feat]: 진행중인 방 상세보기 service 생성 (#66)
Nico1eKim e3be5a6
[feat]: 진행중인 방 상세보기 repository 생성 (#66)
Nico1eKim 184c9ed
[feat]: 진행중인 방 상세보기 service module 작성 (#66)
Nico1eKim 7544a52
[feat]: 진행중인 방 상세보기 viewmodel 작성 (#66)
Nico1eKim d91f077
[refactor]: query에서 userId 제거 (#66)
Nico1eKim a4eafc5
[feat]: 진행중인 방 서버 데이터로 변경 (#66)
Nico1eKim 53028d9
[refactor]: 장르 색상에 따라 컬러 수정 (#66)
Nico1eKim 47b10f4
[feat]: 장르에 따라 배경 이미지, 색상 받아오는 enum 생성 (#66)
Nico1eKim b7b29bb
[refactor]: 장르에 맞는 배경 이미지 적용되도록 수정 (#66)
Nico1eKim a0eef55
[refactor]: mock data 안쓰도록 수정 (#66)
Nico1eKim 546f8ba
[refactor]: 장르에 따라 색상 받아오도록 enum 생성하고 적용 (#66)
Nico1eKim 606c6ba
[feat]: 독서메이트 response 생성 (#66)
Nico1eKim 8cde610
[feat]: 독서메이트 service 작성 (#66)
Nico1eKim 08b1cef
[feat]: 독서메이트 repository 작성 (#66)
Nico1eKim a2bb570
[feat]: 독서메이트 viewmodel 생성 (#66)
Nico1eKim e9cf5d6
[feat]: 서버에서 데이터 받아오기, 독서메이트로 navigation 구현 (#66)
Nico1eKim e1d6636
[refactor]: 프로필 이미지 string으로 수정 (#66)
Nico1eKim dabe5de
[ui]: action book button 배경색 수정 (#66)
Nico1eKim ea25c51
[chore]: 필요없는 mockup 삭제 (#66)
Nico1eKim b3b118c
[refactor]: pr리뷰 반영 (#66)
Nico1eKim 7ca734f
Merge branch 'develop' into api/#66-rooms_playing
Nico1eKim d1bbea6
[refactor]: string 추출 (#66)
Nico1eKim File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
10 changes: 8 additions & 2 deletions
10
app/src/main/java/com/texthip/thip/data/di/ServiceModule.kt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,12 +1,18 @@ | ||
| package com.texthip.thip.data.di | ||
|
|
||
| import com.texthip.thip.data.service.RoomsService | ||
| import dagger.Module | ||
| import dagger.Provides | ||
| import dagger.hilt.InstallIn | ||
| import dagger.hilt.components.SingletonComponent | ||
| import retrofit2.Retrofit | ||
| import javax.inject.Singleton | ||
|
|
||
| @Module | ||
| @InstallIn(SingletonComponent::class) | ||
| object ServiceModule { | ||
| // @Provides | ||
| // @Singleton | ||
| @Provides | ||
| @Singleton | ||
| fun providesRoomsService(retrofit: Retrofit): RoomsService = | ||
| retrofit.create(RoomsService::class.java) | ||
| } |
37 changes: 37 additions & 0 deletions
37
app/src/main/java/com/texthip/thip/data/model/rooms/response/RoomsPlayingResponse.kt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| package com.texthip.thip.data.model.rooms.response | ||
|
|
||
| import kotlinx.serialization.Serializable | ||
|
|
||
| @Serializable | ||
| data class RoomsPlayingResponse( | ||
| val isHost: Boolean, | ||
| val roomId: Int, | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. pk 값에 대한 대응을 한다면 Int 대신 Long 이 어떨까요 ?? |
||
| val roomName: String, | ||
| val roomImageUrl: String, | ||
| val isPublic: Boolean, | ||
| val progressStartDate: String, | ||
| val progressEndDate: String, | ||
| val category: String, | ||
| val roomDescription: String, | ||
| val memberCount: Int, | ||
| val recruitCount: Int, | ||
| val isbn: String, | ||
| val bookTitle: String, | ||
| val authorName: String, | ||
| val currentPage: Int, | ||
| val userPercentage: Double, | ||
| val currentVotes: List<CurrentVote> | ||
| ) | ||
|
|
||
| @Serializable | ||
| data class CurrentVote( | ||
| val content: String, | ||
| val page: Int, | ||
| val isOverview: Boolean, | ||
| val voteItems: List<VoteItem> | ||
| ) | ||
|
|
||
| @Serializable | ||
| data class VoteItem( | ||
| val itemName: String | ||
| ) | ||
17 changes: 17 additions & 0 deletions
17
app/src/main/java/com/texthip/thip/data/model/rooms/response/RoomsUsersResponse.kt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| package com.texthip.thip.data.model.rooms.response | ||
|
|
||
| import kotlinx.serialization.Serializable | ||
|
|
||
| @Serializable | ||
| data class RoomsUsersResponse( | ||
| val userList: List<UserList> | ||
| ) | ||
|
|
||
| @Serializable | ||
| data class UserList( | ||
| val userId: Int, | ||
| val nickname: String, | ||
| val imageUrl: String, | ||
| val alias: String, | ||
| val followerCount: Int, | ||
| ) |
27 changes: 27 additions & 0 deletions
27
app/src/main/java/com/texthip/thip/data/repository/RoomsRepository.kt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| package com.texthip.thip.data.repository | ||
|
|
||
| import com.texthip.thip.data.model.base.handleBaseResponse | ||
| import com.texthip.thip.data.service.RoomsService | ||
| import javax.inject.Inject | ||
| import javax.inject.Singleton | ||
|
|
||
| @Singleton | ||
| class RoomsRepository @Inject constructor( | ||
| private val roomsService: RoomsService, | ||
| ) { | ||
| suspend fun getRoomsPlaying( | ||
| roomId: Int | ||
| ) = runCatching { | ||
| roomsService.getRoomsPlaying( | ||
| roomId = roomId | ||
| ).handleBaseResponse().getOrThrow() | ||
| } | ||
|
|
||
| suspend fun getRoomsUsers( | ||
| roomId: Int | ||
| ) = runCatching { | ||
| roomsService.getRoomsUsers( | ||
| roomId = roomId | ||
| ).handleBaseResponse().getOrThrow() | ||
| } | ||
| } |
19 changes: 19 additions & 0 deletions
19
app/src/main/java/com/texthip/thip/data/service/RoomsService.kt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| package com.texthip.thip.data.service | ||
|
|
||
| import com.texthip.thip.data.model.base.BaseResponse | ||
| import com.texthip.thip.data.model.rooms.response.RoomsPlayingResponse | ||
| import com.texthip.thip.data.model.rooms.response.RoomsUsersResponse | ||
| import retrofit2.http.GET | ||
| import retrofit2.http.Path | ||
|
|
||
| interface RoomsService { | ||
| @GET("rooms/{roomId}/playing") | ||
| suspend fun getRoomsPlaying( | ||
| @Path("roomId") roomId: Int | ||
| ): BaseResponse<RoomsPlayingResponse> | ||
|
|
||
| @GET("rooms/{roomId}/users") | ||
| suspend fun getRoomsUsers( | ||
| @Path("roomId") roomId: Int | ||
| ): BaseResponse<RoomsUsersResponse> | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.