Search in sources :

Example 6 with ReactionRequest

use of com.meisolsson.githubsdk.model.request.ReactionRequest 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);
}
Also used : ReactionRequest(com.meisolsson.githubsdk.model.request.ReactionRequest) ReactionService(com.meisolsson.githubsdk.service.reactions.ReactionService) ApiHelpers(com.gh4a.utils.ApiHelpers) GitComment(com.meisolsson.githubsdk.model.git.GitComment)

Aggregations

ApiHelpers (com.gh4a.utils.ApiHelpers)6 ReactionRequest (com.meisolsson.githubsdk.model.request.ReactionRequest)6 ReactionService (com.meisolsson.githubsdk.service.reactions.ReactionService)6 ReviewComment (com.meisolsson.githubsdk.model.ReviewComment)1 GitComment (com.meisolsson.githubsdk.model.git.GitComment)1 CreateReviewComment (com.meisolsson.githubsdk.model.request.pull_request.CreateReviewComment)1 Response (retrofit2.Response)1