use of com.meisolsson.githubsdk.service.reactions.ReactionService 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.service.reactions.ReactionService in project gh4a by slapperwan.
the class PullRequestDiffViewerActivity method loadReactionDetails.
@Override
public Single<List<Reaction>> loadReactionDetails(ReactionBar.Item item, boolean bypassCache) {
final CommitCommentWrapper comment = (CommitCommentWrapper) item;
final ReactionService service = ServiceFactory.get(ReactionService.class, bypassCache);
return ApiHelpers.PageIterator.toSingle(page -> service.getPullRequestReviewCommentReactions(mRepoOwner, mRepoName, comment.comment.id(), page));
}
use of com.meisolsson.githubsdk.service.reactions.ReactionService 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.service.reactions.ReactionService 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);
}
use of com.meisolsson.githubsdk.service.reactions.ReactionService in project gh4a by slapperwan.
the class CommitNoteAdapter method addReaction.
@Override
public Single<Reaction> addReaction(ReactionBar.Item item, String content) {
GitComment comment = ((ViewHolder) item).mBoundItem;
ReactionService service = ServiceFactory.get(ReactionService.class, false);
ReactionRequest request = ReactionRequest.builder().content(content).build();
return service.createCommitCommentReaction(mRepoOwner, mRepoName, comment.id(), request).map(ApiHelpers::throwOnFailure);
}
Aggregations