@Immutable @Loggable(value=1) public static final class Gist.Smart extends Object implements Gist
Gist.Smart
Constructor and Description |
---|
Gist.Smart(Gist gst)
Public ctor.
|
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.
|
@NotNull(message="identifier is never NULL") public String identifier()
identifier
in interface Gist
@NotNull(message="Iterable of files is never NULL") public Iterable<String> files() throws IOException
IOException
- If there is any I/O problem@NotNull(message="Github is never NULL") public Github github()
Gist
@NotNull(message="read is never NULL") public String read(@NotNull(message="name can\'t be NULL") String name) throws IOException
Gist
read
in interface Gist
name
- Name of itIOException
- If there is any I/O problempublic void write(@NotNull(message="name can\'t be NULL") String name, @NotNull(message="content can\'t be NULL") String content) throws IOException
Gist
write
in interface Gist
name
- Name of itcontent
- Content to writeIOException
- If there is any I/O problempublic void star() throws IOException
Gist
star
in interface Gist
IOException
- If there is any I/O problempublic void unstar() throws IOException
Gist
unstar
in interface Gist
IOException
- If there is any I/O problempublic boolean starred() throws IOException
Gist
starred
in interface Gist
IOException
- If there is any I/O problem@NotNull(message="fork is never NULL") public Gist fork() throws IOException
Gist
fork
in interface Gist
IOException
- If there is any I/O problem@NotNull(message="gist comments is never NULL") public GistComments comments() throws IOException
Gist
comments
in interface Gist
IOException
- If there is any I/O problem@NotNull(message="JSON is never NULL") public javax.json.JsonObject json() throws IOException
JsonReadable
json
in interface JsonReadable
IOException
- If there is any I/O problempublic void patch(@NotNull(message="json can\'t be NULL") javax.json.JsonObject json) throws IOException
JsonPatchable
patch
in interface JsonPatchable
json
- JSON objectIOException
- If there is any I/O problemCopyright © 2012–2014 jcabi.com. All rights reserved.