Skip to content

Commit d624584

Browse files
author
unknown
committed
API 3.0. Issues and Gists.
1 parent 5ac8802 commit d624584

File tree

22 files changed

+1860
-94
lines changed

22 files changed

+1860
-94
lines changed

core/src/main/java/com/github/api/v2/services/GistService.java

Lines changed: 148 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,11 @@
1818

1919
import java.io.InputStream;
2020
import java.util.List;
21+
import java.util.Map;
2122

23+
import com.github.api.v2.schema.Comment;
2224
import com.github.api.v2.schema.Gist;
25+
import com.github.api.v2.schema.Gist.Visibility;
2326

2427
/**
2528
* The Interface GistService.
@@ -57,4 +60,149 @@ public interface GistService extends GitHubService {
5760
* @return the user gists
5861
*/
5962
public List<Gist> getUserGists(String userName);
63+
64+
/**
65+
* Gets the owned gists.
66+
*
67+
* @return the owned gists
68+
*/
69+
public List<Gist> getOwnedGists();
70+
71+
/**
72+
* Gets the public gists.
73+
*
74+
* @return the public gists
75+
*/
76+
public List<Gist> getPublicGists();
77+
78+
/**
79+
* Gets the starred gists.
80+
*
81+
* @return the starred gists
82+
*/
83+
public List<Gist> getStarredGists();
84+
85+
/**
86+
* Creates the gist.
87+
*
88+
* @param userName
89+
* the user name
90+
* @param description
91+
* the description
92+
* @param visibility
93+
* the visibility
94+
* @param contents
95+
* the contents
96+
*
97+
* @return the gist
98+
*/
99+
public Gist createGist(String userName, String description, Visibility visibility, Map<String, String> contents);
100+
101+
/**
102+
* Update gist.
103+
*
104+
* @param gistId
105+
* the gist id
106+
* @param description
107+
* the description
108+
* @param contents
109+
* the contents
110+
*
111+
* @return the gist
112+
*/
113+
public Gist updateGist(String gistId, String description, Map<String, String> contents);
114+
115+
/**
116+
* Star gist.
117+
*
118+
* @param gistId
119+
* the gist id
120+
*/
121+
public void starGist(String gistId);
122+
123+
/**
124+
* Unstar gist.
125+
*
126+
* @param gistId
127+
* the gist id
128+
*/
129+
public void unstarGist(String gistId);
130+
131+
/**
132+
* Checks if is gist starred.
133+
*
134+
* @param gistId
135+
* the gist id
136+
*
137+
* @return true, if is gist starred
138+
*/
139+
public boolean isGistStarred(String gistId);
140+
141+
/**
142+
* Fork gist.
143+
*
144+
* @param gistId
145+
* the gist id
146+
*/
147+
public void forkGist(String gistId);
148+
149+
/**
150+
* Delete gist.
151+
*
152+
* @param gistId
153+
* the gist id
154+
*/
155+
public void deleteGist(String gistId);
156+
157+
/**
158+
* Gets the gist comments.
159+
*
160+
* @param gistId
161+
* the gist id
162+
*
163+
* @return the gist comments
164+
*/
165+
public List<Comment> getGistComments(String gistId);
166+
167+
/**
168+
* Gets the gist comment.
169+
*
170+
* @param commentId
171+
* the comment id
172+
*
173+
* @return the gist comment
174+
*/
175+
public Comment getGistComment(String commentId);
176+
177+
/**
178+
* Creates the gist comment.
179+
*
180+
* @param gistId
181+
* the gist id
182+
* @param commentText
183+
* the comment text
184+
*
185+
* @return the comment
186+
*/
187+
public Comment createGistComment(String gistId, String commentText);
188+
189+
/**
190+
* Update gist comment.
191+
*
192+
* @param commentId
193+
* the comment id
194+
* @param commentText
195+
* the comment text
196+
*
197+
* @return the comment
198+
*/
199+
public Comment updateGistComment(String commentId, String commentText);
200+
201+
/**
202+
* Delete gist comment.
203+
*
204+
* @param commentId
205+
* the comment id
206+
*/
207+
public void deleteGistComment(String commentId);
60208
}

0 commit comments

Comments
 (0)