summaryrefslogtreecommitdiff
path: root/gitlab/objects.py
diff options
context:
space:
mode:
authorGauvain Pocentek <gauvain@pocentek.net>2016-05-13 19:16:50 +0200
committerGauvain Pocentek <gauvain@pocentek.net>2016-05-13 19:16:50 +0200
commit62e4fb9b09efbf9080a6787bcbde09067a9b83ef (patch)
tree568fc35ac3588a77286998ca4717c864982d6372 /gitlab/objects.py
parentee1620bcfe0533b70c9ceebb34968d3633e2613c (diff)
downloadgitlab-62e4fb9b09efbf9080a6787bcbde09067a9b83ef.tar.gz
implement list/get licenses
Diffstat (limited to 'gitlab/objects.py')
-rw-r--r--gitlab/objects.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/gitlab/objects.py b/gitlab/objects.py
index 60ca43a..7c76d53 100644
--- a/gitlab/objects.py
+++ b/gitlab/objects.py
@@ -747,6 +747,18 @@ class IssueManager(BaseManager):
obj_cls = Issue
+class License(GitlabObject):
+ _url = '/licenses'
+ canDelete = False
+ canUpdate = False
+ canCreate = False
+ idAttr = 'key'
+
+
+class LicenseManager(BaseManager):
+ obj_cls = License
+
+
class ProjectBranch(GitlabObject):
_url = '/projects/%(project_id)s/repository/branches'
_constructorTypes = {'author': 'User', "committer": "User"}