-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #22 from Nexters/feature/#9_my-page-2
#9: 마이페이지 구현
- Loading branch information
Showing
44 changed files
with
1,145 additions
and
504 deletions.
There are no files selected for viewing
This file contains 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 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 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 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 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 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 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
18 changes: 18 additions & 0 deletions
18
data/src/main/java/com/keyme/data/remote/repositoryimpl/MemberRepositoryImpl.kt
This file contains 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,18 @@ | ||
package com.keyme.data.remote.repositoryimpl | ||
|
||
import com.keyme.data.remote.api.KeymeApi | ||
import com.keyme.domain.entity.response.MemberStatistics | ||
import com.keyme.domain.entity.response.MemberStatisticsResponse | ||
import com.keyme.domain.repository.MemberRepository | ||
import javax.inject.Inject | ||
|
||
class MemberRepositoryImpl @Inject constructor( | ||
private val keymeApi: KeymeApi, | ||
) : MemberRepository { | ||
override suspend fun getStatistics( | ||
memberId: String, | ||
type: MemberStatistics.StatisticsType, | ||
): MemberStatisticsResponse { | ||
return keymeApi.getMemberStatistics(memberId = memberId, type = type) | ||
} | ||
} |
24 changes: 24 additions & 0 deletions
24
data/src/main/java/com/keyme/data/remote/repositoryimpl/QuestionRepositoryImpl.kt
This file contains 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,24 @@ | ||
package com.keyme.data.remote.repositoryimpl | ||
|
||
import com.keyme.data.remote.api.KeymeApi | ||
import com.keyme.domain.entity.response.QuestionStatisticsResponse | ||
import com.keyme.domain.entity.response.SolvedScoreListResponse | ||
import com.keyme.domain.repository.QuestionRepository | ||
import javax.inject.Inject | ||
|
||
class QuestionRepositoryImpl @Inject constructor( | ||
private val keymeApi: KeymeApi, | ||
) : QuestionRepository { | ||
override suspend fun getStatistics(questionId: String): QuestionStatisticsResponse { | ||
return keymeApi.getQuestionStatistics(id = questionId, ownerId = 1) | ||
} | ||
|
||
override suspend fun getSolvedScoreList( | ||
cursor: Int?, | ||
questionId: String, | ||
limit: Int, | ||
ownerId: Int, | ||
): SolvedScoreListResponse { | ||
return keymeApi.getSolvedScoreList(cursor, questionId, limit, ownerId) | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
domain/src/main/java/com/keyme/domain/entity/member/Member.kt
This file contains 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,13 @@ | ||
package com.keyme.domain.entity.member | ||
|
||
data class Member( | ||
val friendCode: String, | ||
val id: Int, | ||
val nickname: String, | ||
val profileImage: String, | ||
val profileThumbnail: String, | ||
) { | ||
companion object { | ||
val EMPTY = Member(friendCode = "", id = 0, nickname = "", profileImage = "", profileThumbnail = "") | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
domain/src/main/java/com/keyme/domain/entity/response/Category.kt
This file contains 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,7 @@ | ||
package com.keyme.domain.entity.response | ||
|
||
data class Category( | ||
val color: String, | ||
val iconUrl: String, | ||
val name: String, | ||
) |
7 changes: 7 additions & 0 deletions
7
domain/src/main/java/com/keyme/domain/entity/response/Coordinate.kt
This file contains 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,7 @@ | ||
package com.keyme.domain.entity.response | ||
|
||
data class Coordinate( | ||
val r: Double, | ||
val x: Double, | ||
val y: Double, | ||
) |
14 changes: 14 additions & 0 deletions
14
domain/src/main/java/com/keyme/domain/entity/response/MemberStatisticsResponse.kt
This file contains 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,14 @@ | ||
package com.keyme.domain.entity.response | ||
|
||
import com.keyme.domain.entity.BaseResponse | ||
|
||
class MemberStatisticsResponse : BaseResponse<MemberStatistics>() | ||
|
||
data class MemberStatistics( | ||
val memberId: Int = 0, | ||
val results: List<Result> = listOf(), | ||
) { | ||
enum class StatisticsType { | ||
SIMILAR, DIFFERENT | ||
} | ||
} |
3 changes: 3 additions & 0 deletions
3
domain/src/main/java/com/keyme/domain/entity/response/MyQuestionScoreResponse.kt
This file contains 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,3 @@ | ||
package com.keyme.domain.entity.response | ||
|
||
// class MyQuestionScoreResponse: BaseResponse<>() |
13 changes: 13 additions & 0 deletions
13
domain/src/main/java/com/keyme/domain/entity/response/QuestionStatisticsResponse.kt
This file contains 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,13 @@ | ||
package com.keyme.domain.entity.response | ||
|
||
import com.keyme.domain.entity.BaseResponse | ||
|
||
class QuestionStatisticsResponse : BaseResponse<Question>() | ||
|
||
data class Question( | ||
val avgScore: Int, | ||
val category: Category, | ||
val keyword: String, | ||
val questionId: Int, | ||
val title: String, | ||
) |
6 changes: 6 additions & 0 deletions
6
domain/src/main/java/com/keyme/domain/entity/response/Result.kt
This file contains 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,6 @@ | ||
package com.keyme.domain.entity.response | ||
|
||
data class Result( | ||
val coordinate: Coordinate, | ||
val question: Question, | ||
) |
15 changes: 15 additions & 0 deletions
15
domain/src/main/java/com/keyme/domain/entity/response/SolvedScoreListResponse.kt
This file contains 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,15 @@ | ||
package com.keyme.domain.entity.response | ||
|
||
import com.keyme.domain.entity.BaseResponse | ||
|
||
class SolvedScoreListResponse : BaseResponse<SolvedScoreList>() | ||
|
||
data class SolvedScoreList( | ||
val count: Int, | ||
val results: List<SolvedScore>, | ||
) | ||
|
||
data class SolvedScore( | ||
val createAt: String, | ||
val score: Int, | ||
) |
Oops, something went wrong.