@Immutable public interface GistComment extends Comparable<GistComment>, JsonReadable, JsonPatchable
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();
Modifier and Type | Interface and Description |
---|---|
static class |
GistComment.Smart
Smart comment with additional features.
|
Modifier and Type | Method and Description |
---|---|
Gist |
gist()
The gist it's in.
|
int |
number()
Number.
|
void |
remove()
Delete the comment.
|
compareTo
json
patch
@NotNull(message="Gist is never NULL") Gist gist()
int number()
void remove() throws IOException
IOException
- If there is any I/O problemCopyright © 2012–2014 jcabi.com. All rights reserved.