AuthenticatedUser.add_watched and .remove_watched

This commit is contained in:
Vincent Jacques
2012-02-13 22:34:18 +01:00
parent fcbcd145bb
commit d575753130
3 changed files with 10 additions and 6 deletions
+7 -3
View File
@@ -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" )
+2 -2
View File
@@ -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
============
+1 -1
View File
@@ -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 ) )