Spliting GithubObjects.py

This commit is contained in:
Vincent Jacques
2012-03-13 19:37:23 +01:00
parent 5d1add448e
commit 4a5cf98e7f
2 changed files with 8 additions and 10 deletions
-10
View File
@@ -16,16 +16,6 @@ NamedUser._addAttributePolicy(
)
)
def __getOrganizationEvents( user, org ):
return [
Event( user._github, attributes, lazy = True )
for attributes
in user._github._dataRequest( "GET", "/users/" + user.login + "/events/orgs/" + org.login, None, None )
]
AuthenticatedUser._addAttributePolicy(
MethodFromCallable( "get_organization_events", [ "org" ], [], __getOrganizationEvents, SimpleTypePolicy( "list of `Event`" ) )
)
GitRef = GithubObject(
"GitRef",
BaseUrl( lambda obj: obj._repo._baseUrl() + "/git/" + obj.ref ),