@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 Gist
public Iterable<String> files() throws IOException
IOException
- If there is any I/O problempublic String read(String name) throws IOException
Gist
read
in interface Gist
name
- Name of itIOException
- If there is any I/O problempublic void write(String name, 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 problempublic Gist fork() throws IOException
Gist
fork
in interface Gist
IOException
- If there is any I/O problempublic GistComments comments() throws IOException
Gist
comments
in interface Gist
IOException
- If there is any I/O problempublic javax.json.JsonObject json() throws IOException
JsonReadable
json
in interface JsonReadable
IOException
- If there is any I/O problempublic void patch(javax.json.JsonObject json) throws IOException
JsonPatchable
patch
in interface JsonPatchable
json
- JSON objectIOException
- If there is any I/O problemCopyright © 2012–2018 jcabi.com. All rights reserved.