summaryrefslogtreecommitdiff
path: root/docs/gl_objects/projects.py
diff options
context:
space:
mode:
authorGauvain Pocentek <gauvain@pocentek.net>2016-07-16 19:28:25 +0200
committerGauvain Pocentek <gauvain@pocentek.net>2016-07-16 19:28:25 +0200
commitdcf31a425217efebe56d4cbc8250dceb3844b2fa (patch)
tree9a2bf63fbd2430c4c43274a91cc4cffe979e8ae4 /docs/gl_objects/projects.py
parent2df4c9e52a89de7256dacef9cb567ea1b2e056f4 (diff)
downloadgitlab-dcf31a425217efebe56d4cbc8250dceb3844b2fa.tar.gz
docs: add project members doc
Diffstat (limited to 'docs/gl_objects/projects.py')
-rw-r--r--docs/gl_objects/projects.py40
1 files changed, 40 insertions, 0 deletions
diff --git a/docs/gl_objects/projects.py b/docs/gl_objects/projects.py
index 24ce6d6..cd13675 100644
--- a/docs/gl_objects/projects.py
+++ b/docs/gl_objects/projects.py
@@ -65,3 +65,43 @@ gl.project_events.list(project_id=1)
# or
project.events.list()
# end events list
+
+# members list
+members = gl.project_members.list()
+# or
+members = project.members.list()
+# end members list
+
+# members search
+members = gl.project_members.list(query='foo')
+# or
+members = project.members.list(query='bar')
+# end members search
+
+# members get
+member = gl.project_members.get(1)
+# or
+member = project.members.get(1)
+# end members get
+
+# members add
+member = gl.project_members.create({'user_id': user.id, 'access_level':
+ gitlab.Group.DEVELOPER_ACCESS},
+ project_id=1)
+# or
+member = project.members.create({'user_id': user.id, 'access_level':
+ gitlab.Group.DEVELOPER_ACCESS})
+# end members add
+
+# members update
+member.access_level = gitlab.Group.MASTER_ACCESS
+member.save()
+# end members update
+
+# members delete
+gl.project_members.delete(user.id, project_id=1)
+# or
+project.members.delete(user.id)
+# or
+member.delete()
+# end members delete