use of com.meisolsson.githubsdk.model.request.ReactionRequest in project gh4a by slapperwan.
the class IssueFragmentBase method addReaction.
@Override
public Single<Reaction> addReaction(ReactionBar.Item item, String content) {
ReactionService service = ServiceFactory.get(ReactionService.class, false);
ReactionRequest request = ReactionRequest.builder().content(content).build();
return service.createIssueReaction(mRepoOwner, mRepoName, mIssue.number(), request).map(ApiHelpers::throwOnFailure);
}
use of com.meisolsson.githubsdk.model.request.ReactionRequest in project gh4a by slapperwan.
the class ReviewFragment method addReaction.
@Override
public Single<Reaction> addReaction(GitHubCommentBase comment, String content) {
final ReactionService service = ServiceFactory.get(ReactionService.class, false);
final ReactionRequest request = ReactionRequest.builder().content(content).build();
final Single<Response<Reaction>> responseSingle = comment instanceof ReviewComment ? service.createPullRequestReviewCommentReaction(mRepoOwner, mRepoName, comment.id(), request) : service.createIssueCommentReaction(mRepoOwner, mRepoName, comment.id(), request);
return responseSingle.map(ApiHelpers::throwOnFailure);
}
use of com.meisolsson.githubsdk.model.request.ReactionRequest in project gh4a by slapperwan.
the class IssueFragmentBase method addReaction.
@Override
public Single<Reaction> addReaction(GitHubCommentBase comment, String content) {
ReactionService service = ServiceFactory.get(ReactionService.class, false);
ReactionRequest request = ReactionRequest.builder().content(content).build();
return service.createIssueCommentReaction(mRepoOwner, mRepoName, comment.id(), request).map(ApiHelpers::throwOnFailure);
}
use of com.meisolsson.githubsdk.model.request.ReactionRequest in project gh4a by slapperwan.
the class PullRequestDiffViewerActivity method addReaction.
@Override
public Single<Reaction> addReaction(ReactionBar.Item item, String content) {
CommitCommentWrapper comment = (CommitCommentWrapper) item;
ReactionService service = ServiceFactory.get(ReactionService.class, false);
ReactionRequest request = ReactionRequest.builder().content(content).build();
return service.createPullRequestReviewCommentReaction(mRepoOwner, mRepoName, comment.comment.id(), request).map(ApiHelpers::throwOnFailure);
}
use of com.meisolsson.githubsdk.model.request.ReactionRequest in project gh4a by slapperwan.
the class CommitDiffViewerActivity method addReaction.
@Override
public Single<Reaction> addReaction(ReactionBar.Item item, String content) {
CommitCommentWrapper comment = (CommitCommentWrapper) item;
final ReactionService service = ServiceFactory.get(ReactionService.class, false);
ReactionRequest request = ReactionRequest.builder().content(content).build();
return service.createCommitCommentReaction(mRepoOwner, mRepoName, comment.comment.id(), request).map(ApiHelpers::throwOnFailure);
}
Aggregations