@Immutable @Loggable(value=1) public static final class Gist.Smart extends Object implements Gist
Gist.Smart| Modifier and Type | Method and Description |
|---|---|
GistComments |
comments()
Get all comments of the gist.
|
Iterable<String> |
files()
Get a list of all file names in the gist.
|
Gist |
fork()
Fork the gist.
|
Github |
github()
Github we're in.
|
String |
identifier()
Get gist id.
|
javax.json.JsonObject |
json()
Describe it in a JSON object.
|
void |
patch(javax.json.JsonObject json)
Patch using this JSON object.
|
String |
read(String name)
Read file content.
|
void |
star()
Star a gist.
|
boolean |
starred()
Checks if Gist is starred.
|
void |
unstar()
Unstar a gist.
|
void |
write(String name,
String content)
Write file content.
|
public Smart(Gist gst)
gst - Gistpublic String identifier()
identifier in interface Gistpublic Iterable<String> files() throws IOException
IOException - If there is any I/O problempublic String read(String name) throws IOException
Gistread in interface Gistname - Name of itIOException - If there is any I/O problempublic void write(String name, String content) throws IOException
Gistwrite in interface Gistname - Name of itcontent - Content to writeIOException - If there is any I/O problempublic void star()
throws IOException
Giststar in interface GistIOException - If there is any I/O problempublic void unstar()
throws IOException
Gistunstar in interface GistIOException - If there is any I/O problempublic boolean starred()
throws IOException
Giststarred in interface GistIOException - If there is any I/O problempublic Gist fork() throws IOException
Gistfork in interface GistIOException - If there is any I/O problempublic GistComments comments() throws IOException
Gistcomments in interface GistIOException - If there is any I/O problempublic javax.json.JsonObject json()
throws IOException
JsonReadablejson in interface JsonReadableIOException - If there is any I/O problempublic void patch(javax.json.JsonObject json)
throws IOException
JsonPatchablepatch in interface JsonPatchablejson - JSON objectIOException - If there is any I/O problemCopyright © 2012–2018 jcabi.com. All rights reserved.