Search in sources :

Example 6 with IssueCommentService

use of com.meisolsson.githubsdk.service.issues.IssueCommentService in project gh4a by slapperwan.

the class EditIssueCommentActivity method createComment.

@Override
protected Single<GitHubCommentBase> createComment(String repoOwner, String repoName, String body, long replyToCommentId) {
    int issueNumber = getIntent().getIntExtra("issue", 0);
    IssueCommentService service = ServiceFactory.get(IssueCommentService.class, false);
    CommentRequest request = CommentRequest.builder().body(body).build();
    return service.createIssueComment(repoOwner, repoName, issueNumber, request).map(ApiHelpers::throwOnFailure);
}
Also used : CommentRequest(com.meisolsson.githubsdk.model.request.CommentRequest) IssueCommentService(com.meisolsson.githubsdk.service.issues.IssueCommentService) ApiHelpers(com.gh4a.utils.ApiHelpers)

Aggregations

ApiHelpers (com.gh4a.utils.ApiHelpers)6 IssueCommentService (com.meisolsson.githubsdk.service.issues.IssueCommentService)6 CommentRequest (com.meisolsson.githubsdk.model.request.CommentRequest)3 Intent (android.content.Intent)2 AttrRes (android.support.annotation.AttrRes)2 View (android.view.View)2 R (com.gh4a.R)2 ServiceFactory (com.gh4a.ServiceFactory)2 EditIssueCommentActivity (com.gh4a.activities.EditIssueCommentActivity)2 TimelineItem (com.gh4a.model.TimelineItem)2 IntentUtils (com.gh4a.utils.IntentUtils)2 RxUtils (com.gh4a.utils.RxUtils)2 GitHubCommentBase (com.meisolsson.githubsdk.model.GitHubCommentBase)2 Issue (com.meisolsson.githubsdk.model.Issue)2 IssueState (com.meisolsson.githubsdk.model.IssueState)2 ReviewComment (com.meisolsson.githubsdk.model.ReviewComment)2 IssueEventService (com.meisolsson.githubsdk.service.issues.IssueEventService)2 PullRequestReviewCommentService (com.meisolsson.githubsdk.service.pull_request.PullRequestReviewCommentService)2 Response (retrofit2.Response)2 Bundle (android.os.Bundle)1