From a98e0560d72e9dffbdbd45cb5d0a3cd45932cd00 Mon Sep 17 00:00:00 2001 From: Max Wittig Date: Sat, 10 Aug 2019 14:57:22 +0200 Subject: WIP --- gitlab/v4/objects.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/gitlab/v4/objects.py b/gitlab/v4/objects.py index 2642a40..8da455a 100644 --- a/gitlab/v4/objects.py +++ b/gitlab/v4/objects.py @@ -143,6 +143,16 @@ class UserCustomAttributeManager(RetrieveMixin, SetMixin, DeleteMixin, RESTManag _from_parent_attrs = {"user_id": "id"} +class UserStatus(ObjectDeleteMixin, RESTObject): + _id_attr = "key" + + +class UserStatusManager(RetrieveMixin, SetMixin, DeleteMixin, RESTManager): + _path = "/users/%(user_id)s/status" + _obj_cls = UserStatus + _from_parent_attrs = {"user_id": "id"} + + class UserEmail(ObjectDeleteMixin, RESTObject): _short_print_attr = "email" @@ -266,6 +276,7 @@ class User(SaveMixin, ObjectDeleteMixin, RESTObject): _short_print_attr = "username" _managers = ( ("customattributes", "UserCustomAttributeManager"), + ("status", "UserStatusManager"), ("emails", "UserEmailManager"), ("events", "UserEventManager"), ("gpgkeys", "UserGPGKeyManager"), -- cgit v1.2.1