-
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.
- Loading branch information
Showing
9 changed files
with
51 additions
and
5 deletions.
There are no files selected for viewing
9 changes: 9 additions & 0 deletions
9
app/src/main/java/com/chunbae/narchive/data/remote/api/TodoService.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,11 +1,20 @@ | ||
package com.chunbae.narchive.data.remote.api | ||
|
||
import com.chunbae.narchive.data.remote.request.RequestTodoGroupData | ||
import com.chunbae.narchive.data.remote.response.ResponseCommonWithString | ||
import com.chunbae.narchive.data.remote.response.ResponseTodoGroupData | ||
import retrofit2.Response | ||
import retrofit2.http.Body | ||
import retrofit2.http.GET | ||
import retrofit2.http.POST | ||
|
||
interface TodoService { | ||
|
||
@GET("/todo/groups") | ||
suspend fun getTodoGroupList() : Response<ResponseTodoGroupData> | ||
|
||
@POST("/todo/groups") | ||
suspend fun postTodoGroup( | ||
@Body body : RequestTodoGroupData | ||
) : Response<ResponseCommonWithString> | ||
} |
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
6 changes: 6 additions & 0 deletions
6
app/src/main/java/com/chunbae/narchive/data/remote/request/RequestTodoGroupData.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.chunbae.narchive.data.remote.request | ||
|
||
data class RequestTodoGroupData( | ||
val groupTitle : String, | ||
val groupColor : String | ||
) |
7 changes: 7 additions & 0 deletions
7
app/src/main/java/com/chunbae/narchive/data/remote/response/ResponseCommonWithString.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.chunbae.narchive.data.remote.response | ||
|
||
import com.chunbae.narchive.presentation.util.BaseResponse | ||
|
||
data class ResponseCommonWithString( | ||
val result : String | ||
) : BaseResponse() |
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
3 changes: 3 additions & 0 deletions
3
app/src/main/java/com/chunbae/narchive/domain/repository/TodoGroupRepository.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,8 +1,11 @@ | ||
package com.chunbae.narchive.domain.repository | ||
|
||
import com.chunbae.narchive.data.data.GroupData | ||
import com.chunbae.narchive.data.remote.request.RequestTodoGroupData | ||
|
||
interface TodoGroupRepository { | ||
|
||
suspend fun getTodoGroupListData() : Result<List<GroupData>> | ||
|
||
suspend fun postTodoGroupData(body : RequestTodoGroupData) : Result<String> | ||
} |
3 changes: 3 additions & 0 deletions
3
app/src/main/java/com/chunbae/narchive/domain/source/TodoGroupSource.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,8 +1,11 @@ | ||
package com.chunbae.narchive.domain.source | ||
|
||
import com.chunbae.narchive.data.data.GroupData | ||
import com.chunbae.narchive.data.remote.request.RequestTodoGroupData | ||
|
||
interface TodoGroupSource { | ||
|
||
suspend fun getTodoGroupListData() : Result<List<GroupData>> | ||
|
||
suspend fun postTodoGroupData(body : RequestTodoGroupData) : Result<String> | ||
} |
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