summaryrefslogtreecommitdiff
path: root/docs/gl_objects/branches.py
diff options
context:
space:
mode:
authorGauvain Pocentek <gauvain@pocentek.net>2017-08-11 16:07:04 +0200
committerGauvain Pocentek <gauvain@pocentek.net>2017-08-11 16:07:04 +0200
commit4057644f03829e4439ec8ab1feacf90c65d976eb (patch)
tree977658ba5109c8a3b512a882bf0a037daad754cb /docs/gl_objects/branches.py
parent80eab7b0c0682c5df99495acc4d6f71f36603cfc (diff)
downloadgitlab-4057644f03829e4439ec8ab1feacf90c65d976eb.tar.gz
Update the objects doc/examples for v4
Diffstat (limited to 'docs/gl_objects/branches.py')
-rw-r--r--docs/gl_objects/branches.py15
1 files changed, 5 insertions, 10 deletions
diff --git a/docs/gl_objects/branches.py b/docs/gl_objects/branches.py
index b485ee0..b80dfc0 100644
--- a/docs/gl_objects/branches.py
+++ b/docs/gl_objects/branches.py
@@ -1,27 +1,22 @@
# list
-branches = gl.project_branches.list(project_id=1)
-# or
branches = project.branches.list()
# end list
# get
-branch = gl.project_branches.get(project_id=1, id='master')
-# or
branch = project.branches.get('master')
# end get
# create
-branch = gl.project_branches.create({'branch_name': 'feature1',
- 'ref': 'master'},
- project_id=1)
-# or
+# v4
+branch = project.branches.create({'branch': 'feature1',
+ 'ref': 'master'})
+
+#v3
branch = project.branches.create({'branch_name': 'feature1',
'ref': 'master'})
# end create
# delete
-gl.project_branches.delete(project_id=1, id='feature1')
-# or
project.branches.delete('feature1')
# or
branch.delete()