User.get_orgs

This commit is contained in:
Vincent Jacques
2012-02-12 20:39:40 +01:00
parent 6007a90e09
commit c8dfda6504
4 changed files with 8 additions and 2 deletions
+2
View File
@@ -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 ):
+3
View File
@@ -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 ),