Commit 36815d07 authored by Konstantin Tskhovrebov's avatar Konstantin Tskhovrebov 🤖

Merge branch 'feature/notes_request' into develop

parents 7efedf04 264883f8
......@@ -165,4 +165,20 @@ interface GitlabApi {
@POST("$API_PATH/todos/mark_as_done")
fun markAllPendingTodosAsDone(): Completable
@GET("$API_PATH/projects/{project_id}/issues/{issue_id}/notes")
fun getIssueNotes(
@Path("project_id") projectId: Long,
@Path("issue_id") issueId: Long,
@Query("order_by") orderBy: OrderBy?,
@Query("sort") sort: Sort?
): Single<List<Note>>
@GET("$API_PATH/projects/{project_id}/merge_requests/{merge_request_id}/notes")
fun getMergeRequestNotes(
@Path("project_id") projectId: Long,
@Path("merge_request_id") mergeRequestId: Long,
@Query("order_by") orderBy: OrderBy?,
@Query("sort") sort: Sort?
): Single<List<Note>>
}
\ No newline at end of file
......@@ -28,4 +28,9 @@ class IssueInteractor @Inject constructor(
projectId: Long,
issueId: Long
) = issueRepository.getIssue(projectId, issueId)
fun getIssueNotes(
projectId: Long,
issueId: Long
) = issueRepository.getIssueNotes(projectId, issueId)
}
\ No newline at end of file
......@@ -25,4 +25,9 @@ class MergeRequestInteractor @Inject constructor(
projectId: Long,
mergeRequestId: Long
) = mergeRequestRepository.getMergeRequest(projectId, mergeRequestId)
fun getMergeRequestNotes(
projectId: Long,
mergeRequestId: Long
) = mergeRequestRepository.getMergeRequestNotes(projectId, mergeRequestId)
}
\ No newline at end of file
......@@ -97,4 +97,14 @@ class IssueRepository @Inject constructor(
.getIssue(projectId, issueId)
.subscribeOn(schedulers.io())
.observeOn(schedulers.ui())
fun getIssueNotes(
projectId: Long,
issueId: Long,
orderBy: OrderBy? = null,
sort: Sort? = null
) = api
.getIssueNotes(projectId, issueId, orderBy, sort)
.subscribeOn(schedulers.io())
.observeOn(schedulers.ui())
}
\ No newline at end of file
......@@ -104,4 +104,14 @@ class MergeRequestRepository @Inject constructor(
.getMergeRequest(projectId, mergeRequestId)
.subscribeOn(schedulers.io())
.observeOn(schedulers.ui())
fun getMergeRequestNotes(
projectId: Long,
mergeRequestId: Long,
orderBy: OrderBy? = null,
sort: Sort? = null
) = api
.getMergeRequestNotes(projectId, mergeRequestId, orderBy, sort)
.subscribeOn(schedulers.io())
.observeOn(schedulers.ui())
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment