mirror of
https://github.com/status-im/PyGithub.git
synced 2026-09-02 11:51:10 +00:00
AuthenticatedUser.get_organization_events
This commit is contained in:
@@ -191,6 +191,16 @@ 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 ),
|
||||
|
||||
Reference in New Issue
Block a user