|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.egit.github.core.service.GitHubService
org.eclipse.egit.github.core.service.GistService
public class GistService
Service class for interacting with Gists and Gist comments.
Field Summary |
---|
Fields inherited from class org.eclipse.egit.github.core.service.GitHubService |
---|
ACCEPT_FULL, ACCEPT_HTML, ACCEPT_TEXT, client |
Constructor Summary | |
---|---|
GistService()
Create gist service |
|
GistService(GitHubClient client)
Create gist service |
Method Summary | |
---|---|
protected String |
checkGistId(String gistId)
Check that gist id is non-null and non-empty |
Comment |
createComment(String gistId,
String comment)
Create comment on specified gist id |
Gist |
createGist(Gist gist)
Create a gist |
protected PagedRequest<Gist> |
createUserGistRequest(String user,
int start,
int size)
Create user gist paged request |
void |
deleteComment(long commentId)
Delete the Gist comment with the given id |
void |
deleteGist(String gistId)
Delete the Gist with the given id |
Comment |
editComment(Comment comment)
Edit gist comment |
Gist |
forkGist(String gistId)
Fork gist with given id |
Comment |
getComment(long commentId)
Get gist comment with id |
List<Comment> |
getComments(String gistId)
Get comments for specified gist id |
Gist |
getGist(String id)
Get gist |
List<Gist> |
getGists(String user)
Get gists for specified user |
List<Gist> |
getStarredGists()
Get starred gists for currently authenticated user |
boolean |
isStarred(String gistId)
Check if a gist is starred |
PageIterator<Gist> |
pageGists(String user)
Create page iterator for given user's gists |
PageIterator<Gist> |
pageGists(String user,
int size)
Create page iterator for given user's gists |
PageIterator<Gist> |
pageGists(String user,
int start,
int size)
Create page iterator for given user's gists |
PageIterator<Gist> |
pagePublicGists()
Create page iterator for all public gists |
PageIterator<Gist> |
pagePublicGists(int size)
Create page iterator for all public gists |
PageIterator<Gist> |
pagePublicGists(int start,
int size)
Create page iterator for all public gists |
PageIterator<Gist> |
pageStarredGists()
Create page iterator for the current user's starred gists |
PageIterator<Gist> |
pageStarredGists(int size)
Create page iterator for the current user's starred gists |
PageIterator<Gist> |
pageStarredGists(int start,
int size)
Create page iterator for the current user's starred gists |
void |
starGist(String gistId)
Star the gist with the given id |
void |
unstarGist(String gistId)
Unstar the gist with the given id |
Gist |
updateGist(Gist gist)
Update a gist |
Methods inherited from class org.eclipse.egit.github.core.service.GitHubService |
---|
check, createPagedRequest, createPagedRequest, createPageIterator, createRequest, getAll, getAll, getClient, getId, verifyRepository |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GistService()
public GistService(GitHubClient client)
client
- Method Detail |
---|
protected String checkGistId(String gistId)
gistId
-
public Gist getGist(String id) throws IOException
id
-
IOException
public PageIterator<Gist> pageStarredGists()
public PageIterator<Gist> pageStarredGists(int size)
size
- size of page
public PageIterator<Gist> pageStarredGists(int start, int size)
size
- size of pagestart
- starting page
public List<Gist> getStarredGists() throws IOException
IOException
protected PagedRequest<Gist> createUserGistRequest(String user, int start, int size)
user
- start
- size
-
public List<Gist> getGists(String user) throws IOException
user
-
IOException
public PageIterator<Gist> pageGists(String user)
user
-
public PageIterator<Gist> pageGists(String user, int size)
user
- size
- size of page
public PageIterator<Gist> pageGists(String user, int start, int size)
user
- size
- size of pagestart
- starting page
public PageIterator<Gist> pagePublicGists()
public PageIterator<Gist> pagePublicGists(int size)
size
- size of page
public PageIterator<Gist> pagePublicGists(int start, int size)
start
- starting page numbersize
- size of page
public Gist createGist(Gist gist) throws IOException
gist
-
IOException
public Gist updateGist(Gist gist) throws IOException
gist
-
IOException
public Comment createComment(String gistId, String comment) throws IOException
gistId
- comment
-
IOException
public List<Comment> getComments(String gistId) throws IOException
gistId
-
IOException
public void deleteGist(String gistId) throws IOException
gistId
-
IOException
public Comment getComment(long commentId) throws IOException
commentId
-
IOException
public Comment editComment(Comment comment) throws IOException
comment
-
IOException
public void deleteComment(long commentId) throws IOException
commentId
-
IOException
public void starGist(String gistId) throws IOException
gistId
-
IOException
public void unstarGist(String gistId) throws IOException
gistId
-
IOException
public boolean isStarred(String gistId) throws IOException
gistId
-
IOException
public Gist forkGist(String gistId) throws IOException
gistId
-
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |