Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.egit.github.core/src/org/eclipse/egit/github/core/service/WatcherService.java')
-rw-r--r--org.eclipse.egit.github.core/src/org/eclipse/egit/github/core/service/WatcherService.java24
1 files changed, 22 insertions, 2 deletions
diff --git a/org.eclipse.egit.github.core/src/org/eclipse/egit/github/core/service/WatcherService.java b/org.eclipse.egit.github.core/src/org/eclipse/egit/github/core/service/WatcherService.java
index a341ded5..1d41c348 100644
--- a/org.eclipse.egit.github.core/src/org/eclipse/egit/github/core/service/WatcherService.java
+++ b/org.eclipse.egit.github.core/src/org/eclipse/egit/github/core/service/WatcherService.java
@@ -18,8 +18,6 @@ import static org.eclipse.egit.github.core.client.IGitHubConstants.SEGMENT_WATCH
import static org.eclipse.egit.github.core.client.PagedRequest.PAGE_FIRST;
import static org.eclipse.egit.github.core.client.PagedRequest.PAGE_SIZE;
-import com.google.gson.reflect.TypeToken;
-
import java.io.IOException;
import java.util.List;
@@ -30,12 +28,16 @@ import org.eclipse.egit.github.core.client.GitHubClient;
import org.eclipse.egit.github.core.client.PageIterator;
import org.eclipse.egit.github.core.client.PagedRequest;
+import com.google.gson.reflect.TypeToken;
+
/**
* Service class for dealing with users watching GitHub repositories.
*
* @see <a href="http://developer.github.com/v3/repos/watching">GitHub watcher
* API documentation</a>
+ * @deprecated use {@link StargazerService} instead
*/
+@Deprecated
public class WatcherService extends GitHubService {
/**
@@ -61,6 +63,7 @@ public class WatcherService extends GitHubService {
* @param start
* @param size
* @return request
+ * @deprecated use {@link StargazerService#createStargazerRequest}
*/
protected PagedRequest<User> createWatcherRequest(
IRepositoryIdProvider repository, int start, int size) {
@@ -81,6 +84,7 @@ public class WatcherService extends GitHubService {
* @param repository
* @return non-null but possibly empty list of users
* @throws IOException
+ * @deprecated use {@link StargazerService#getStargazers} instead
*/
public List<User> getWatchers(IRepositoryIdProvider repository)
throws IOException {
@@ -94,6 +98,7 @@ public class WatcherService extends GitHubService {
*
* @param repository
* @return page iterator
+ * @deprecated use {@link StargazerService#pageStargazers}
*/
public PageIterator<User> pageWatchers(IRepositoryIdProvider repository) {
return pageWatchers(repository, PAGE_SIZE);
@@ -105,6 +110,7 @@ public class WatcherService extends GitHubService {
* @param repository
* @param size
* @return page iterator
+ * @deprecated use {@link StargazerService#pageStargazers}
*/
public PageIterator<User> pageWatchers(IRepositoryIdProvider repository,
int size) {
@@ -118,6 +124,7 @@ public class WatcherService extends GitHubService {
* @param start
* @param size
* @return page iterator
+ * @deprecated use {@link StargazerService#pageStargazers}
*/
public PageIterator<User> pageWatchers(IRepositoryIdProvider repository,
int start, int size) {
@@ -133,6 +140,7 @@ public class WatcherService extends GitHubService {
* @param start
* @param size
* @return request
+ * @deprecated use {@link StargazerService#createStarredRequest}
*/
protected PagedRequest<Repository> createWatchedRequest(String user,
int start, int size) {
@@ -157,6 +165,7 @@ public class WatcherService extends GitHubService {
* @param start
* @param size
* @return request
+ * @deprecated use {@link StargazerService#createStarredRequest}
*/
protected PagedRequest<Repository> createWatchedRequest(int start, int size) {
PagedRequest<Repository> request = createPagedRequest(start, size);
@@ -172,6 +181,7 @@ public class WatcherService extends GitHubService {
* @param user
* @return non-null but possibly empty list of repositories
* @throws IOException
+ * @deprecated use {@link StargazerService#getStarred}
*/
public List<Repository> getWatched(String user) throws IOException {
PagedRequest<Repository> request = createWatchedRequest(user,
@@ -185,6 +195,7 @@ public class WatcherService extends GitHubService {
* @param user
* @return page iterator
* @throws IOException
+ * @deprecated use {@link StargazerService#pageStarred}
*/
public PageIterator<Repository> pageWatched(String user) throws IOException {
return pageWatched(user, PAGE_SIZE);
@@ -197,6 +208,7 @@ public class WatcherService extends GitHubService {
* @param size
* @return page iterator
* @throws IOException
+ * @deprecated use {@link StargazerService#pageStarred}
*/
public PageIterator<Repository> pageWatched(String user, int size)
throws IOException {
@@ -211,6 +223,7 @@ public class WatcherService extends GitHubService {
* @param size
* @return page iterator
* @throws IOException
+ * @deprecated use {@link StargazerService#pageStarred}
*/
public PageIterator<Repository> pageWatched(String user, int start, int size)
throws IOException {
@@ -224,6 +237,7 @@ public class WatcherService extends GitHubService {
*
* @return non-null but possibly empty list of repositories
* @throws IOException
+ * @deprecated use {@link StargazerService#getStarred}
*/
public List<Repository> getWatched() throws IOException {
PagedRequest<Repository> request = createWatchedRequest(PAGE_FIRST,
@@ -236,6 +250,7 @@ public class WatcherService extends GitHubService {
*
* @return page iterator
* @throws IOException
+ * @deprecated use {@link StargazerService#pageStarred}
*/
public PageIterator<Repository> pageWatched() throws IOException {
return pageWatched(PAGE_SIZE);
@@ -247,6 +262,7 @@ public class WatcherService extends GitHubService {
* @param size
* @return page iterator
* @throws IOException
+ * @deprecated use {@link StargazerService#pageStarred}
*/
public PageIterator<Repository> pageWatched(int size) throws IOException {
return pageWatched(PAGE_FIRST, size);
@@ -259,6 +275,7 @@ public class WatcherService extends GitHubService {
* @param size
* @return page iterator
* @throws IOException
+ * @deprecated use {@link StargazerService#pageStarred}
*/
public PageIterator<Repository> pageWatched(int start, int size)
throws IOException {
@@ -272,6 +289,7 @@ public class WatcherService extends GitHubService {
* @param repository
* @return true if watch, false otherwise
* @throws IOException
+ * @deprecated use {@link StargazerService#isStarring}
*/
public boolean isWatching(IRepositoryIdProvider repository)
throws IOException {
@@ -287,6 +305,7 @@ public class WatcherService extends GitHubService {
*
* @param repository
* @throws IOException
+ * @deprecated use {@link StargazerService#star}
*/
public void watch(IRepositoryIdProvider repository) throws IOException {
String id = getId(repository);
@@ -301,6 +320,7 @@ public class WatcherService extends GitHubService {
*
* @param repository
* @throws IOException
+ * @deprecated use {@link StargazerService#unstar}
*/
public void unwatch(IRepositoryIdProvider repository) throws IOException {
String id = getId(repository);

Back to the top