Package com.jcabi.github
Interface Gist
-
- All Superinterfaces:
JsonPatchable,JsonReadable
- All Known Implementing Classes:
Gist.Smart
@Immutable public interface Gist extends JsonReadable, JsonPatchable
Github gist.- Since:
- 0.1
- Version:
- $Id: 08af84d91b33a96a51fdfe49951b3da4eb4eb6ec $
- Author:
- Yegor Bugayenko (yegor256@gmail.com)
- See Also:
- Gists API
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classGist.SmartSmart Gist with extra features.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description GistCommentscomments()Get all comments of the gist.Gistfork()Fork the gist.Githubgithub()Github we're in.Stringidentifier()Get gist identifier.Stringread(String name)Read file content.voidstar()Star a gist.booleanstarred()Checks if Gist is starred.voidunstar()Unstar a gist.voidwrite(String name, String content)Write file content.-
Methods inherited from interface com.jcabi.github.JsonPatchable
patch
-
Methods inherited from interface com.jcabi.github.JsonReadable
json
-
-
-
-
Method Detail
-
github
Github github()
Github we're in.- Returns:
- Github
-
identifier
String identifier()
Get gist identifier.- Returns:
- Gist identifier
-
read
String read(String name) throws IOException
Read file content.- Parameters:
name- Name of it- Returns:
- File content
- Throws:
IOException- If there is any I/O problem- See Also:
- Get a Single Gist
-
write
void write(String name, String content) throws IOException
Write file content.- Parameters:
name- Name of itcontent- Content to write- Throws:
IOException- If there is any I/O problem- See Also:
- Edit a Gist
-
star
void star() throws IOException
Star a gist.- Throws:
IOException- If there is any I/O problem
-
unstar
void unstar() throws IOExceptionUnstar a gist.- Throws:
IOException- If there is any I/O problem
-
starred
boolean starred() throws IOExceptionChecks if Gist is starred.- Returns:
- True if gist is starred
- Throws:
IOException- If there is any I/O problem
-
fork
Gist fork() throws IOException
Fork the gist.- Returns:
- Forked gist
- Throws:
IOException- If there is any I/O problem
-
comments
GistComments comments() throws IOException
Get all comments of the gist.- Returns:
- GistComments
- Throws:
IOException- If there is any I/O problem- See Also:
- Gist Comments API
-
-