mirror of
https://github.com/status-im/PyGithub.git
synced 2026-08-31 10:51:14 +00:00
User.get_orgs
This commit is contained in:
@@ -15,6 +15,7 @@ def dumpUser( u ):
|
||||
print "<-", r.source.owner.login + "/" + r.source.name,
|
||||
print
|
||||
print " Watched:", ", ".join( r.name for r in u.get_watched() )
|
||||
print " Organizations:", ", ".join( o.login for o in u.get_orgs() )
|
||||
print
|
||||
|
||||
def dumpOrganization( o ):
|
||||
|
||||
+2
-2
@@ -424,7 +424,7 @@
|
||||
|
||||
/user/orgs
|
||||
==========
|
||||
- GET: `` (TODO)
|
||||
- GET: `AuthenticatedUser.get_orgs()` : list of `Organization`
|
||||
|
||||
/user/repos
|
||||
===========
|
||||
@@ -471,7 +471,7 @@
|
||||
|
||||
/users/:user/orgs
|
||||
=================
|
||||
- GET: `` (TODO)
|
||||
- GET: `NamedUser.get_orgs()` : list of `Organization`
|
||||
|
||||
/users/:user/received_events
|
||||
============================
|
||||
|
||||
@@ -9,6 +9,8 @@ class SimpleScalarAttributes:
|
||||
self.__attributeNames = attributeNames
|
||||
|
||||
def getValueFromRawValue( self, obj, rawValue ):
|
||||
# if isinstance( rawValue, dict ):
|
||||
# print rawValue, "is a dict, you may want to use an extended attribute for it"
|
||||
return rawValue
|
||||
|
||||
def updateAttributes( self, obj ):
|
||||
|
||||
@@ -38,6 +38,9 @@ Organization = GithubObject(
|
||||
ExtendedListAttribute( "members", NamedUser ),
|
||||
)
|
||||
|
||||
AuthenticatedUser._addAttributePolicy( ExtendedListAttribute( "orgs", Organization ) )
|
||||
NamedUser._addAttributePolicy( ExtendedListAttribute( "orgs", Organization ) )
|
||||
|
||||
Repository = GithubObject(
|
||||
"Repository",
|
||||
BaseUrl( lambda obj: "/repos/" + obj.owner.login + "/" + obj.name ),
|
||||
|
||||
Reference in New Issue
Block a user