summaryrefslogtreecommitdiff
path: root/gitlab.py
diff options
context:
space:
mode:
authorMart Sõmermaa <mart.somermaa@cgi.com>2013-11-19 09:39:31 +0200
committerMart Sõmermaa <mart.somermaa@cgi.com>2013-11-19 09:39:31 +0200
commit32d422445388766e7cc4913a51bf8890487d4ce5 (patch)
tree623be8f596d4830ab6543e096b515b43490c5299 /gitlab.py
parent6705928406667ee010f448e41c14cfa63c263178 (diff)
downloadgitlab-32d422445388766e7cc4913a51bf8890487d4ce5.tar.gz
Add support for project events.
Diffstat (limited to 'gitlab.py')
-rw-r--r--gitlab.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/gitlab.py b/gitlab.py
index 6365d80..ac86bef 100644
--- a/gitlab.py
+++ b/gitlab.py
@@ -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,