Support listing watched repositories of given username.

This commit is contained in:
Kenneth Reitz
2010-08-15 06:38:48 -04:00
parent ec62e41850
commit 4c852c3b9d
+7
View File
@@ -91,3 +91,10 @@ class Repositories(GithubCommand):
def branches(self, project):
return self.make_request("show", project, "branches",
filter="branches")
def watching(self, for_user=None):
"""Lists all the repos a user is watching."""
for_user = for_user or self.request.username
return self.get_values("watched", for_user, filter="repositories",
datatype=Repository)