diff options
author | Mart Sõmermaa <mart.somermaa@cgi.com> | 2013-11-19 09:39:31 +0200 |
---|---|---|
committer | Mart Sõmermaa <mart.somermaa@cgi.com> | 2013-11-19 09:39:31 +0200 |
commit | 32d422445388766e7cc4913a51bf8890487d4ce5 (patch) | |
tree | 623be8f596d4830ab6543e096b515b43490c5299 /gitlab.py | |
parent | 6705928406667ee010f448e41c14cfa63c263178 (diff) | |
download | gitlab-32d422445388766e7cc4913a51bf8890487d4ce5.tar.gz |
Add support for project events.
Diffstat (limited to 'gitlab.py')
-rw-r--r-- | gitlab.py | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -683,6 +683,16 @@ class ProjectKey(GitlabObject): requiredCreateAttrs = ['project_id', 'title', 'key'] +class ProjectEvent(GitlabObject): + _url = '/projects/%(project_id)s/events' + canGet = False + canDelete = False + canUpdate = False + canCreate = False + requiredListAttrs = ['project_id'] + shortPrintAttr = 'target_title' + + class ProjectHook(GitlabObject): _url = '/projects/%(project_id)s/hooks' requiredListAttrs = ['project_id'] @@ -844,6 +854,11 @@ class Project(GitlabObject): project_id=self.id, **kwargs) + def Event(self, id=None, **kwargs): + return self._getListOrObject(ProjectEvent, id, + project_id=self.id, + **kwargs) + def Hook(self, id=None, **kwargs): return self._getListOrObject(ProjectHook, id, project_id=self.id, |