-
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.
Merge branch 'develop' into mod-open-link-validity
- Loading branch information
Showing
56 changed files
with
773 additions
and
433 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
13 changes: 13 additions & 0 deletions
13
app/src/main/java/org/sopt/pingle/data/datasource/remote/MainListRemoteDataSource.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 org.sopt.pingle.data.datasource.remote | ||
|
||
import org.sopt.pingle.data.model.remote.response.ResponseMainListDto | ||
import org.sopt.pingle.util.base.BaseResponse | ||
|
||
interface MainListRemoteDataSource { | ||
suspend fun getMainListPingleList( | ||
searchWord: String?, | ||
category: String?, | ||
teamId: Long, | ||
order: String | ||
): BaseResponse<ResponseMainListDto> | ||
} |
8 changes: 4 additions & 4 deletions
8
app/src/main/java/org/sopt/pingle/data/datasource/remote/MapRemoteDataSource.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 |
---|---|---|
@@ -1,15 +1,15 @@ | ||
package org.sopt.pingle.data.datasource.remote | ||
|
||
import org.sopt.pingle.data.model.remote.response.ResponsePinListDto | ||
import org.sopt.pingle.data.model.remote.response.ResponsePingleListDto | ||
import org.sopt.pingle.data.model.remote.response.ResponsePinDto | ||
import org.sopt.pingle.data.model.remote.response.ResponsePingleDto | ||
import org.sopt.pingle.util.base.BaseResponse | ||
|
||
interface MapRemoteDataSource { | ||
suspend fun getPinListWithoutFiltering( | ||
teamId: Long, | ||
category: String?, | ||
searchWord: String? | ||
): BaseResponse<List<ResponsePinListDto>> | ||
): BaseResponse<List<ResponsePinDto>> | ||
|
||
suspend fun getPingleList(teamId: Long, pinId: Long, category: String?): BaseResponse<List<ResponsePingleListDto>> | ||
suspend fun getMapPingleList(teamId: Long, pinId: Long, category: String?): BaseResponse<List<ResponsePingleDto>> | ||
} |
8 changes: 8 additions & 0 deletions
8
app/src/main/java/org/sopt/pingle/data/datasource/remote/MyGroupListRemoteDataSource.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 org.sopt.pingle.data.datasource.remote | ||
|
||
import org.sopt.pingle.data.model.remote.response.ResponseMyGroupDto | ||
import org.sopt.pingle.util.base.BaseResponse | ||
|
||
interface MyGroupListRemoteDataSource { | ||
suspend fun getMyGroupList(): BaseResponse<List<ResponseMyGroupDto>> | ||
} |
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
23 changes: 23 additions & 0 deletions
23
app/src/main/java/org/sopt/pingle/data/datasourceimpl/remote/MainListRemoteDataSourceImpl.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,23 @@ | ||
package org.sopt.pingle.data.datasourceimpl.remote | ||
|
||
import javax.inject.Inject | ||
import org.sopt.pingle.data.datasource.remote.MainListRemoteDataSource | ||
import org.sopt.pingle.data.model.remote.response.ResponseMainListDto | ||
import org.sopt.pingle.data.service.MainListService | ||
import org.sopt.pingle.util.base.BaseResponse | ||
|
||
class MainListRemoteDataSourceImpl @Inject constructor( | ||
private val mainListService: MainListService | ||
) : MainListRemoteDataSource { | ||
override suspend fun getMainListPingleList( | ||
searchWord: String?, | ||
category: String?, | ||
teamId: Long, | ||
order: String | ||
): BaseResponse<ResponseMainListDto> = mainListService.getMainListPingleList( | ||
searchWord = searchWord, | ||
category = category, | ||
teamId = teamId, | ||
order = order | ||
) | ||
} |
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
...c/main/java/org/sopt/pingle/data/datasourceimpl/remote/MyGroupListRemoteDataSourceImpl.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 org.sopt.pingle.data.datasourceimpl.remote | ||
|
||
import javax.inject.Inject | ||
import org.sopt.pingle.data.datasource.remote.MyGroupListRemoteDataSource | ||
import org.sopt.pingle.data.model.remote.response.ResponseMyGroupDto | ||
import org.sopt.pingle.data.service.MyGroupListService | ||
import org.sopt.pingle.util.base.BaseResponse | ||
|
||
class MyGroupListRemoteDataSourceImpl @Inject constructor( | ||
private val myGroupListService: MyGroupListService | ||
) : MyGroupListRemoteDataSource { | ||
override suspend fun getMyGroupList(): BaseResponse<List<ResponseMyGroupDto>> = | ||
myGroupListService.getMyGroupList() | ||
} |
12 changes: 12 additions & 0 deletions
12
app/src/main/java/org/sopt/pingle/data/model/remote/response/ResponseMainListDto.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,12 @@ | ||
package org.sopt.pingle.data.model.remote.response | ||
|
||
import kotlinx.serialization.SerialName | ||
import kotlinx.serialization.Serializable | ||
|
||
@Serializable | ||
data class ResponseMainListDto( | ||
@SerialName("searchCount") | ||
val searchCount: Int, | ||
@SerialName("meetings") | ||
val meetings: List<ResponsePingleDto> | ||
) |
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
24 changes: 24 additions & 0 deletions
24
app/src/main/java/org/sopt/pingle/data/repository/MainListRepositoryImpl.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 org.sopt.pingle.data.repository | ||
|
||
import javax.inject.Inject | ||
import org.sopt.pingle.data.datasource.remote.MainListRemoteDataSource | ||
import org.sopt.pingle.domain.model.PingleEntity | ||
import org.sopt.pingle.domain.repository.MainListRepository | ||
|
||
class MainListRepositoryImpl @Inject constructor( | ||
private val mainListRemoteDataSource: MainListRemoteDataSource | ||
) : MainListRepository { | ||
override suspend fun getMainListPingleList( | ||
searchWord: String?, | ||
category: String?, | ||
teamId: Long, | ||
order: String | ||
): Result<List<PingleEntity>> = runCatching { | ||
mainListRemoteDataSource.getMainListPingleList( | ||
searchWord = searchWord, | ||
category = category, | ||
teamId = teamId, | ||
order = order | ||
).data.meetings.map { meeting -> meeting.toPingleEntity() } | ||
} | ||
} |
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
app/src/main/java/org/sopt/pingle/data/repository/MyGroupListRepositoryImpl.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 org.sopt.pingle.data.repository | ||
|
||
import javax.inject.Inject | ||
import org.sopt.pingle.data.datasource.remote.MyGroupListRemoteDataSource | ||
import org.sopt.pingle.domain.model.MyGroupEntity | ||
import org.sopt.pingle.domain.repository.MyGroupListRepository | ||
|
||
class MyGroupListRepositoryImpl @Inject constructor( | ||
private val myGroupListRemoteDataSource: MyGroupListRemoteDataSource | ||
) : MyGroupListRepository { | ||
override suspend fun getMyGroupList(): Result<List<MyGroupEntity>> = runCatching { | ||
myGroupListRemoteDataSource.getMyGroupList().data.map { myGroup -> myGroup.toResponseMyGroupEntity() } | ||
} | ||
} |
26 changes: 26 additions & 0 deletions
26
app/src/main/java/org/sopt/pingle/data/service/MainListService.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,26 @@ | ||
package org.sopt.pingle.data.service | ||
|
||
import org.sopt.pingle.data.model.remote.response.ResponseMainListDto | ||
import org.sopt.pingle.util.base.BaseResponse | ||
import retrofit2.http.GET | ||
import retrofit2.http.Query | ||
|
||
interface MainListService { | ||
@GET("$VERSION/$MEETINGS/$SEARCH") | ||
suspend fun getMainListPingleList( | ||
@Query(SEARCH_WORD) searchWord: String?, | ||
@Query(CATEGORY) category: String?, | ||
@Query(TEAM_ID) teamId: Long, | ||
@Query(ORDER) order: String | ||
): BaseResponse<ResponseMainListDto> | ||
|
||
companion object { | ||
const val VERSION = "v1" | ||
const val MEETINGS = "meetings" | ||
const val SEARCH = "search" | ||
const val SEARCH_WORD = "q" | ||
const val CATEGORY = "category" | ||
const val TEAM_ID = "teamId" | ||
const val ORDER = "order" | ||
} | ||
} |
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
17 changes: 17 additions & 0 deletions
17
app/src/main/java/org/sopt/pingle/data/service/MyGroupListService.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 org.sopt.pingle.data.service | ||
|
||
import org.sopt.pingle.data.model.remote.response.ResponseMyGroupDto | ||
import org.sopt.pingle.util.base.BaseResponse | ||
import retrofit2.http.GET | ||
|
||
interface MyGroupListService { | ||
@GET("$VERSION/$USERS/$ME/$TEAMS") | ||
suspend fun getMyGroupList(): BaseResponse<List<ResponseMyGroupDto>> | ||
|
||
companion object { | ||
const val VERSION = "v1" | ||
const val USERS = "users" | ||
const val ME = "me" | ||
const val TEAMS = "teams" | ||
} | ||
} |
Oops, something went wrong.