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 class
Gist.Smart
Smart Gist with extra features.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description GistComments
comments()
Get all comments of the gist.Gist
fork()
Fork the gist.Github
github()
Github we're in.String
identifier()
Get gist identifier.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.-
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 IOException
Unstar a gist.- Throws:
IOException
- If there is any I/O problem
-
starred
boolean starred() throws IOException
Checks 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
-
-