Package com.jcabi.github
Interface PullComment
-
- All Superinterfaces:
Comparable<PullComment>
,JsonPatchable
,JsonReadable
- All Known Implementing Classes:
PullComment.Smart
@Immutable public interface PullComment extends JsonReadable, JsonPatchable, Comparable<PullComment>
Github pull comment.PullComment implements
JsonReadable
, that's how you can get its full details in JSON format. For example, to get its id, you get the entire JSON and then gets its element:String id = comment.jsn().getString("id");
However, it's better to use a supplementary "smart" decorator, which automates most of these operations:
String id = new PullComment.Smart(comment).identifier();
- Since:
- 0.8
- Version:
- $Id: 0a9fac66209b5e52aedcfe2dae58b2b668c85172 $
- Author:
- Carlos Miranda (miranda.cma@gmail.com)
- See Also:
- Pull Comments API
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
PullComment.Smart
Smart PullComment with extra features.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
number()
Get its number.Pull
pull()
Pull we're in.void
react(Reaction reaction)
Adds the reaction to the pull comment.Collection<Reaction>
reactions()
List the reactions of the pull comment.-
Methods inherited from interface java.lang.Comparable
compareTo
-
Methods inherited from interface com.jcabi.github.JsonPatchable
patch
-
Methods inherited from interface com.jcabi.github.JsonReadable
json
-
-
-
-
Method Detail
-
pull
Pull pull()
Pull we're in.- Returns:
- Pull
-
number
int number()
Get its number.- Returns:
- Pull comment number
-
react
void react(Reaction reaction)
Adds the reaction to the pull comment.- Parameters:
reaction
- Reaction to be added.
-
reactions
Collection<Reaction> reactions()
List the reactions of the pull comment.- Returns:
- Comment reactions.
-
-