-
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.
Paging 구현 및 Retrofit + Kotlinx-Serialization 으로 migration (#141)
* Data, Domain 모듈 내에 paging 의존성 추가 * 장소 조회, 공지 조회 페이징 처리 구현 * Retrofit, kotlinx-serialization 라이브러리 의존성 추가 * Ktor + Moshi -> Retrofit + kotlinx-serialization 으로 migration Authenticator, Paging 구현 * style check success * 문의 API UseCase 추가 * Exception 변수 정리 네이밍 변경, 한 파일 내에서 관리
- Loading branch information
Showing
139 changed files
with
2,832 additions
and
1,343 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
99 changes: 0 additions & 99 deletions
99
data/src/main/kotlin/us/wedemy/eggeum/android/data/client/HttpClient.kt
This file was deleted.
Oops, something went wrong.
21 changes: 0 additions & 21 deletions
21
data/src/main/kotlin/us/wedemy/eggeum/android/data/datasource/LoginRemoteDataSource.kt
This file was deleted.
Oops, something went wrong.
75 changes: 0 additions & 75 deletions
75
...src/main/kotlin/us/wedemy/eggeum/android/data/datasource/LoginRemoteDataSourceProvider.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
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
19 changes: 19 additions & 0 deletions
19
data/src/main/kotlin/us/wedemy/eggeum/android/data/datasource/login/LoginRemoteDataSource.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,19 @@ | ||
/* | ||
* Designed and developed by Wedemy 2023. | ||
* | ||
* Licensed under the MIT. | ||
* Please see full license: https://github.com/Wedemy/eggeum-android/blob/main/LICENSE | ||
*/ | ||
|
||
package us.wedemy.eggeum.android.data.datasource.login | ||
|
||
import us.wedemy.eggeum.android.data.model.login.LoginRequest | ||
import us.wedemy.eggeum.android.data.model.login.LoginResponse | ||
import us.wedemy.eggeum.android.data.model.login.SignUpRequest | ||
import us.wedemy.eggeum.android.data.model.login.SignUpResponse | ||
|
||
public interface LoginRemoteDataSource { | ||
public suspend fun login(loginRequest: LoginRequest): LoginResponse? | ||
|
||
public suspend fun signUp(signUpRequest: SignUpRequest): SignUpResponse? | ||
} |
34 changes: 34 additions & 0 deletions
34
...c/main/kotlin/us/wedemy/eggeum/android/data/datasource/login/LoginRemoteDataSourceImpl.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,34 @@ | ||
/* | ||
* Designed and developed by Wedemy 2023. | ||
* | ||
* Licensed under the MIT. | ||
* Please see full license: https://github.com/Wedemy/eggeum-android/blob/main/LICENSE | ||
*/ | ||
|
||
package us.wedemy.eggeum.android.data.datasource.login | ||
|
||
import javax.inject.Inject | ||
import us.wedemy.eggeum.android.data.model.login.LoginRequest | ||
import us.wedemy.eggeum.android.data.model.login.LoginResponse | ||
import us.wedemy.eggeum.android.data.model.login.SignUpRequest | ||
import us.wedemy.eggeum.android.data.model.login.SignUpResponse | ||
import us.wedemy.eggeum.android.data.service.LoginService | ||
import us.wedemy.eggeum.android.data.util.safeRequest | ||
|
||
public class LoginRemoteDataSourceImpl @Inject constructor( | ||
private val service: LoginService, | ||
) : LoginRemoteDataSource { | ||
public override suspend fun login(loginRequest: LoginRequest): LoginResponse? { | ||
return safeRequest { | ||
service.login(loginRequest) | ||
} | ||
} | ||
|
||
public override suspend fun signUp( | ||
signUpRequest: SignUpRequest, | ||
): SignUpResponse? { | ||
return safeRequest { | ||
service.signUp(signUpRequest) | ||
} | ||
} | ||
} |
25 changes: 25 additions & 0 deletions
25
data/src/main/kotlin/us/wedemy/eggeum/android/data/datasource/notice/NoticeDataSource.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,25 @@ | ||
/* | ||
* Designed and developed by Wedemy 2023. | ||
* | ||
* Licensed under the MIT. | ||
* Please see full license: https://github.com/Wedemy/eggeum-android/blob/main/LICENSE | ||
*/ | ||
|
||
package us.wedemy.eggeum.android.data.datasource.notice | ||
|
||
import androidx.paging.PagingData | ||
import kotlinx.coroutines.flow.Flow | ||
import us.wedemy.eggeum.android.data.model.notice.NoticeResponse | ||
|
||
public interface NoticeDataSource { | ||
public suspend fun getNotice(noticeId: Int): NoticeResponse? | ||
|
||
public suspend fun getNoticeList( | ||
search: String?, | ||
page: Int?, | ||
size: Int?, | ||
sort: String?, | ||
startDate: String?, | ||
endDate: String?, | ||
): Flow<PagingData<NoticeResponse>> | ||
} |
Oops, something went wrong.