-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Feat/#81] splash api 연결 및 tendency result api / UI 작업
- Loading branch information
Showing
49 changed files
with
713 additions
and
252 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
8 changes: 8 additions & 0 deletions
8
data/src/main/java/com/going/data/datasource/ProfileDataSource.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,8 @@ | ||
package com.going.data.datasource | ||
|
||
import com.going.data.dto.BaseResponse | ||
import com.going.data.dto.response.UserProfileResponseDto | ||
|
||
interface ProfileDataSource { | ||
suspend fun getUserProfile(): BaseResponse<UserProfileResponseDto> | ||
} |
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
14 changes: 14 additions & 0 deletions
14
data/src/main/java/com/going/data/datasourceImpl/ProfileDataSourceImpl.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.going.data.datasourceImpl | ||
|
||
import com.going.data.datasource.ProfileDataSource | ||
import com.going.data.dto.BaseResponse | ||
import com.going.data.dto.response.UserProfileResponseDto | ||
import com.going.data.service.ProfileService | ||
import javax.inject.Inject | ||
|
||
class ProfileDataSourceImpl @Inject constructor( | ||
private val profileService: ProfileService, | ||
) : ProfileDataSource { | ||
override suspend fun getUserProfile(): BaseResponse<UserProfileResponseDto> = | ||
profileService.getUserProfile() | ||
} |
17 changes: 17 additions & 0 deletions
17
data/src/main/java/com/going/data/dto/response/UserProfileResponseDto.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,17 @@ | ||
package com.going.data.dto.response | ||
|
||
import com.going.domain.entity.request.UserProfileRequestModel | ||
import kotlinx.serialization.SerialName | ||
import kotlinx.serialization.Serializable | ||
|
||
@Serializable | ||
data class UserProfileResponseDto( | ||
@SerialName("name") | ||
val name: String, | ||
@SerialName("intro") | ||
val intro: String, | ||
@SerialName("result") | ||
val result: Int, | ||
) { | ||
fun toProfileModel() = UserProfileRequestModel(name, intro, result) | ||
} |
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
16 changes: 16 additions & 0 deletions
16
data/src/main/java/com/going/data/repositoryImpl/ProfileRepositoryImpl.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,16 @@ | ||
package com.going.data.repositoryImpl | ||
|
||
import com.going.data.datasource.AuthDataSource | ||
import com.going.data.datasource.ProfileDataSource | ||
import com.going.domain.entity.request.UserProfileRequestModel | ||
import com.going.domain.repository.AuthRepository | ||
import com.going.domain.repository.ProfileRepository | ||
import javax.inject.Inject | ||
|
||
class ProfileRepositoryImpl @Inject constructor( | ||
private val profileDataSource: ProfileDataSource | ||
) : ProfileRepository { | ||
override suspend fun getUserProfile(): Result<UserProfileRequestModel> = runCatching { | ||
profileDataSource.getUserProfile().data.toProfileModel() | ||
} | ||
} |
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
10 changes: 10 additions & 0 deletions
10
data/src/main/java/com/going/data/service/ProfileService.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,10 @@ | ||
package com.going.data.service | ||
|
||
import com.going.data.dto.BaseResponse | ||
import com.going.data.dto.response.UserProfileResponseDto | ||
import retrofit2.http.GET | ||
|
||
interface ProfileService { | ||
@GET("api/users/profile") | ||
suspend fun getUserProfile(): BaseResponse<UserProfileResponseDto> | ||
} |
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,5 @@ | ||
package com.going.domain.entity | ||
|
||
enum class AuthState { | ||
LOADING, SUCCESS, FAILURE, SIGNUP, SIGNIN, TENDENCY, EMPTY | ||
} |
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
7 changes: 7 additions & 0 deletions
7
domain/src/main/kotlin/com/going/domain/entity/request/UserProfileRequestModel.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.going.domain.entity.request | ||
|
||
data class UserProfileRequestModel( | ||
val name: String, | ||
val intro: String, | ||
val result: Int, | ||
) |
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
7 changes: 7 additions & 0 deletions
7
domain/src/main/kotlin/com/going/domain/repository/ProfileRepository.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.going.domain.repository | ||
|
||
import com.going.domain.entity.request.UserProfileRequestModel | ||
|
||
interface ProfileRepository { | ||
suspend fun getUserProfile(): Result<UserProfileRequestModel> | ||
} |
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
9 changes: 0 additions & 9 deletions
9
presentation/src/main/java/com/going/presentation/onboarding/signin/SignInState.kt
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.