Package com.jcabi.github
Interface Comment
- All Superinterfaces:
Comparable<Comment>,JsonPatchable,JsonReadable
- All Known Implementing Classes:
Comment.Smart,SfComment
GitHub issue comment.
Comment implements JsonReadable, that's how you can get its full
details in JSON format. For example, to get its author's GitHub login
you get the entire JSON and then gets its element:
String login = comment.json()
.getJsonObject("user")
.getString("login");
However, it's better to use a supplementary "smart" decorator, which automates most of these operations:
String login = new Comment.Smart(comment).author().login();
- Since:
- 0.1
- See Also:
- Suppressed Checkstyle violations:
- MultipleStringLiterals (500 lines)
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classSmart comment with additional features. -
Method Summary
Methods inherited from interface java.lang.Comparable
compareToMethods inherited from interface com.jcabi.github.JsonPatchable
patchMethods inherited from interface com.jcabi.github.JsonReadable
json
-
Method Details
-
issue
Issue issue()The issue it's in.- Returns:
- Owner of the comment
-
number
long number()Number.- Returns:
- Comment number
-
remove
Delete the comment.- Throws:
IOException- If there is any I/O problem- See Also:
-
react
Adds the reaction to the comment.- Parameters:
reaction- Reaction to be added.- Throws:
IOException- In case something goes wrong.
-
reactions
List the reactions of the comment.- Returns:
- Comment reactions.
-