mirror of
https://github.com/a-mayb3/KanbanCloneAndroid.git
synced 2026-03-21 18:15:38 +01:00
Added more necessary endpoints to ApiService.kt
This commit is contained in:
parent
a8f9a69d58
commit
e4280f0490
3 changed files with 36 additions and 4 deletions
|
|
@ -40,6 +40,18 @@ interface ApiService {
|
|||
@GET("projects/{project_id}/users/")
|
||||
suspend fun getProjectUsers(@Path("project_id") projectId: Int): Response<List<UserBase>>
|
||||
|
||||
@POST("projects/{project_id}/users/")
|
||||
suspend fun addProjectCollaborator(
|
||||
@Path("project_id") projectId: Int,
|
||||
@Body email: Map<String, String>
|
||||
): Response<Unit>
|
||||
|
||||
@DELETE("projects/{project_id}/users/{user_id}/")
|
||||
suspend fun removeProjectCollaborator(
|
||||
@Path("project_id") projectId: Int,
|
||||
@Path("user_id") userId: Int
|
||||
): Response<Unit>
|
||||
|
||||
@POST("projects/")
|
||||
suspend fun createProject(@Body projectCreate: ProjectCreate): Response<ProjectBase>
|
||||
|
||||
|
|
@ -57,4 +69,17 @@ interface ApiService {
|
|||
@POST("projects/{project_id}/tasks/")
|
||||
suspend fun createTask(@Path("project_id") projectId: Int, @Body taskBase: TaskBase): Response<TaskBase>
|
||||
|
||||
@PUT("projects/{project_id}/tasks/{task_id}/")
|
||||
suspend fun updateProjectTask(
|
||||
@Path("project_id") projectId: Int,
|
||||
@Path("task_id") taskId: Int,
|
||||
@Body taskUpdate: TaskUpdate
|
||||
): Response<Unit>
|
||||
|
||||
@DELETE("projects/{project_id}/tasks/{task_id}/")
|
||||
suspend fun deleteProjectTask(
|
||||
@Path("project_id") projectId: Int,
|
||||
@Path("task_id") taskId: Int
|
||||
): Response<Unit>
|
||||
|
||||
}
|
||||
|
|
|
|||
10
app/src/main/res/values/arrays.xml
Normal file
10
app/src/main/res/values/arrays.xml
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string-array name="task_status_options">
|
||||
<item>Pending</item>
|
||||
<item>In progress</item>
|
||||
<item>Completed</item>
|
||||
<item>Stashed</item>
|
||||
<item>Failed</item>
|
||||
</string-array>
|
||||
</resources>
|
||||
Loading…
Add table
Add a link
Reference in a new issue