mirror of
https://github.com/status-im/PyGithub.git
synced 2026-08-31 10:51:14 +00:00
AuthenticatedUser.xxx_emails
This commit is contained in:
+6
-4
@@ -116,9 +116,9 @@ class IntegrationTest:
|
||||
self.doSomeWrites()
|
||||
|
||||
def doSomeReads( self ):
|
||||
self.dumpUser( self.g.get_user(), doHasInFollowing = True )
|
||||
self.dumpUser( self.g.get_user(), doPrivateThings = True )
|
||||
jacquev6 = self.g.get_user( "jacquev6" )
|
||||
self.dumpUser( jacquev6, doHasInFollowing = False )
|
||||
self.dumpUser( jacquev6, doPrivateThings = False )
|
||||
self.dumpOrganization( self.g.get_organization( "github" ), doTeams = False )
|
||||
self.dumpOrganization( self.g.get_organization( "BeaverSoftware" ), doTeams = True )
|
||||
self.dumpRepository( jacquev6.get_repo( "PyGithub" ) )
|
||||
@@ -177,7 +177,7 @@ class IntegrationTest:
|
||||
|
||||
self.dumpRepository( r )
|
||||
|
||||
def dumpUser( self, u, doHasInFollowing ):
|
||||
def dumpUser( self, u, doPrivateThings ):
|
||||
print u.login, "(", u.name, ")"
|
||||
print " Repos:"
|
||||
for r in u.get_repos():
|
||||
@@ -186,10 +186,12 @@ class IntegrationTest:
|
||||
print "<-", r.parent.owner.login + "/" + r.parent.name,
|
||||
print "<-", r.source.owner.login + "/" + r.source.name,
|
||||
print
|
||||
if doPrivateThings:
|
||||
print " Emails:", ", ".join( u.get_emails() )
|
||||
print " Watched:", ", ".join( r.name for r in u.get_watched() )
|
||||
print " Organizations:", ", ".join( o.login for o in u.get_orgs() )
|
||||
print " Following:", ", ".join( f.login for f in u.get_following() )
|
||||
if doHasInFollowing:
|
||||
if doPrivateThings:
|
||||
print " Is following jacquev6:", u.has_in_following( self.g.get_user( "jacquev6" ) )
|
||||
print " Followers:", ", ".join( f.login for f in u.get_followers() )
|
||||
print
|
||||
|
||||
+3
-3
@@ -397,9 +397,9 @@ API `/user`
|
||||
|
||||
API `/user/emails`
|
||||
==================
|
||||
* GET: (TODO SOON)
|
||||
* POST: (TODO SOON)
|
||||
* DELETE: (TODO SOON)
|
||||
* GET: `AuthenticatedUser.get_emails()`: list of strings
|
||||
* POST: `AuthenticatedUser.add_to_emails( ... )`
|
||||
* DELETE: `AuthenticatedUser.remove_from_emails( ... )`
|
||||
|
||||
API `/user/followers`
|
||||
=====================
|
||||
|
||||
@@ -46,6 +46,12 @@ Following
|
||||
* `add_to_following( user )`
|
||||
* `remove_from_following( user )`
|
||||
|
||||
Emails
|
||||
------
|
||||
* `get_emails()` list of strings
|
||||
* `add_to_emails( email, ... )`
|
||||
* `remove_from_emails( email, ... )`
|
||||
|
||||
Class `NamedUser`
|
||||
=================
|
||||
* Attributes: see [API](http://developer.github.com/v3/users/#get-a-single-user)
|
||||
|
||||
@@ -15,6 +15,11 @@ AuthenticatedUser = GithubObject(
|
||||
"disk_usage", "collaborators", "plan",
|
||||
),
|
||||
Editable( [], [ "name", "email", "blog", "company", "location", "hireable", "bio" ] ),
|
||||
ExternalListOfSimpleTypes( "emails",
|
||||
ListGetable( [], [] ),
|
||||
SeveralElementsAddable(),
|
||||
SeveralElementsRemovable()
|
||||
),
|
||||
)
|
||||
|
||||
NamedUser = GithubObject(
|
||||
|
||||
Reference in New Issue
Block a user