summaryrefslogtreecommitdiff
path: root/gitlab/v4/objects.py
diff options
context:
space:
mode:
Diffstat (limited to 'gitlab/v4/objects.py')
-rw-r--r--gitlab/v4/objects.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/gitlab/v4/objects.py b/gitlab/v4/objects.py
index 55696a0..3223b63 100644
--- a/gitlab/v4/objects.py
+++ b/gitlab/v4/objects.py
@@ -1394,6 +1394,18 @@ class ProjectKeyManager(CRUDMixin, RESTManager):
self.gitlab.http_post(path, **kwargs)
+class ProjectBadge(SaveMixin, ObjectDeleteMixin, RESTObject):
+ pass
+
+
+class ProjectBadgeManager(CRUDMixin, RESTManager):
+ _path = '/projects/%(project_id)s/badges'
+ _obj_cls = ProjectBadge
+ _from_parent_attrs = {'project_id': 'id'}
+ _create_attrs = (('link_url', 'image_url'), tuple())
+ _update_attrs = (('link_url', 'image_url'), tuple())
+
+
class ProjectEvent(Event):
pass
@@ -2707,6 +2719,7 @@ class Project(SaveMixin, ObjectDeleteMixin, RESTObject):
_short_print_attr = 'path'
_managers = (
('accessrequests', 'ProjectAccessRequestManager'),
+ ('badges', 'ProjectBadgeManager'),
('boards', 'ProjectBoardManager'),
('branches', 'ProjectBranchManager'),
('jobs', 'ProjectJobManager'),