mirror of
https://github.com/status-im/PyGithub.git
synced 2026-08-31 10:51:14 +00:00
AuthenticatedUser.add_watched and .remove_watched
This commit is contained in:
+7
-3
@@ -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
@@ -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
|
||||
============
|
||||
|
||||
@@ -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 ) )
|
||||
|
||||
Reference in New Issue
Block a user