Package com.jcabi.github
Interface GistComment
- All Superinterfaces:
Comparable<GistComment>,JsonPatchable,JsonReadable
- All Known Implementing Classes:
GistComment.Smart
@Immutable
public interface GistComment
extends Comparable<GistComment>, JsonReadable, JsonPatchable
Gist comment.
Gist 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 GistComment.Smart(comment).author().login();
- Since:
- 0.8
- 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
-
gist
Gist gist()The gist it's in.- Returns:
- Owner of the comment
-
number
int number()Number.- Returns:
- Comment id
-
remove
Delete the comment.- Throws:
IOException- If there is any I/O problem
-