Skip to content

Commit 4c852c3

Browse files
author
Kenneth Reitz
committed
Support listing watched repositories of given username.
1 parent ec62e41 commit 4c852c3

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

github2/repositories.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,3 +91,10 @@ def tags(self, project):
9191
def branches(self, project):
9292
return self.make_request("show", project, "branches",
9393
filter="branches")
94+
95+
def watching(self, for_user=None):
96+
"""Lists all the repos a user is watching."""
97+
for_user = for_user or self.request.username
98+
return self.get_values("watched", for_user, filter="repositories",
99+
datatype=Repository)
100+

0 commit comments

Comments
 (0)