summaryrefslogtreecommitdiff
path: root/docs/gl_objects/projects.py
diff options
context:
space:
mode:
authorGauvain Pocentek <gauvain@pocentek.net>2016-10-23 16:16:54 +0200
committerGauvain Pocentek <gauvain@pocentek.net>2016-10-23 16:16:54 +0200
commitf332907457c897ad0483a0bffce3d01503445d0b (patch)
treed871082cc6b0fec206ea5c7a135fe4573039b1a2 /docs/gl_objects/projects.py
parent20fdbe870f161ad7c47c7d57ebb2b6952acba8be (diff)
downloadgitlab-f332907457c897ad0483a0bffce3d01503445d0b.tar.gz
Add support for boards API
This is not fully usable because the gitlab API has some limitations: - not possible to create boards programmatically - not possible to get labels ID (https://gitlab.com/gitlab-org/gitlab-ce/issues/23448)
Diffstat (limited to 'docs/gl_objects/projects.py')
-rw-r--r--docs/gl_objects/projects.py36
1 files changed, 36 insertions, 0 deletions
diff --git a/docs/gl_objects/projects.py b/docs/gl_objects/projects.py
index 7623c15..c2bc5aa 100644
--- a/docs/gl_objects/projects.py
+++ b/docs/gl_objects/projects.py
@@ -405,3 +405,39 @@ pipeline.retry()
# pipeline cancel
pipeline.cancel()
# end pipeline cancel
+
+# boards list
+boards = gl.project_boards.list(project_id=1)
+# or
+boards = project.boards.list()
+# end boards list
+
+# boards get
+board = gl.project_boards.get(board_id, project_id=1)
+# or
+board = project.boards.get(board_id)
+# end boards get
+
+# board lists list
+b_lists = board.lists.list()
+# end board lists list
+
+# board lists get
+b_list = board.lists.get(list_id)
+# end board lists get
+
+# board lists create
+# First get a ProjectLabel
+label = get_or_create_label()
+# Then use its ID to create the new board list
+b_list = board.lists.create({'label_id': label.id})
+# end board lists create
+
+# board lists update
+b_list.position = 2
+b_list.save()
+# end board lists update
+
+# board lists delete
+b_list.delete()
+# end boards lists delete