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
- Version:
- $Id: e6b015cf5b84dfcaa2c9d49a688cddf4f48e3f38 $
- Author:
- Giang Le (giang@vn-smartsolutions.com)
- See Also:
- Gist Comments API
- Suppressed Checkstyle violations:
- MultipleStringLiterals (500 lines)
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
GistComment.Smart
Smart comment with additional features.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Gist
gist()
The gist it's in.int
number()
Number.void
remove()
Delete the 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
-
gist
Gist gist()
The gist it's in.- Returns:
- Owner of the comment
-
number
int number()
Number.- Returns:
- Comment id
-
remove
void remove() throws IOException
Delete the comment.- Throws:
IOException
- If there is any I/O problem- See Also:
- Delete a Comment
-
-