diff --git a/IntegrationTest.py b/IntegrationTest.py index cc2c20f2..32d50ca6 100644 --- a/IntegrationTest.py +++ b/IntegrationTest.py @@ -39,13 +39,17 @@ dumpOrganization( g.get_organization( "github" ) ) dumpOrganization( g.get_organization( "BeaverSoftware" ) ) dumpRepository( g.get_user( "nvie" ).get_repos()[ 0 ] ) -# u = g.get_user() +u = g.get_user() # print "Bio before:", u.bio # u.edit( bio = u.bio + "(Edited by PyGithub)" ) # print "Bio after:", u.bio -# g.get_user().remove_following( g.get_user( "Lyloa" ) ) -# g.get_user().add_following( g.get_user( "Lyloa" ) ) +# u.remove_following( g.get_user( "Lyloa" ) ) +# u.add_following( g.get_user( "Lyloa" ) ) + +# for r in g.get_user( "cjuniet" ).get_repos(): + # u.add_watched( r ) + # u.remove_watched( r ) # o = g.get_organization( "BeaverSoftware" ) # o.edit( location = "Paris, France" ) diff --git a/Reference.md b/Reference.md index c2592139..47b30ab3 100644 --- a/Reference.md +++ b/Reference.md @@ -438,8 +438,8 @@ /user/watched/:user/:repo ========================= - GET: `` (TODO) - - PUT: `` (TODO) - - DELETE: `` (TODO) + - PUT: `AuthenticatedUser.add_watched( repo )` + - DELETE: `AuthenticatedUser.remove_watched( repo )` /users/:user ============ diff --git a/github/GithubObjects.py b/github/GithubObjects.py index 1dee3d81..22485f34 100644 --- a/github/GithubObjects.py +++ b/github/GithubObjects.py @@ -81,5 +81,5 @@ AuthenticatedUser._addAttributePolicy( ExtendedListAttribute( "repos", Repositor NamedUser._addAttributePolicy( ExtendedListAttribute( "repos", Repository ) ) Organization._addAttributePolicy( ExtendedListAttribute( "repos", Repository ) ) -AuthenticatedUser._addAttributePolicy( ExtendedListAttribute( "watched", Repository ) ) +AuthenticatedUser._addAttributePolicy( ExtendedListAttribute( "watched", Repository, True, True ) ) NamedUser._addAttributePolicy( ExtendedListAttribute( "watched", Repository ) )