File tree 2 files changed +18
-0
lines changed
2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -40,6 +40,20 @@ You can also use configuration files to create ``gitlab.Gitlab`` objects:
40
40
See the :ref: `cli_configuration ` section for more information about
41
41
configuration files.
42
42
43
+ **GitLab v4 support **
44
+
45
+ ``python-gitlab `` uses the v3 GitLab API by default. Use the ``api_version ``
46
+ parameter to switch to v4:
47
+
48
+ .. code-block :: python
49
+
50
+ import gitlab
51
+
52
+ gl = gitlab.Gitlab(' http://10.0.0.1' , ' JVNSESs8EwWRx5yDxM5q' , api_version = 4 )
53
+
54
+ .. warning ::
55
+
56
+ The v4 support is experimental.
43
57
44
58
Managers
45
59
========
Original file line number Diff line number Diff line change @@ -36,10 +36,12 @@ The configuration file uses the ``INI`` format. It contains at least a
36
36
default = somewhere
37
37
ssl_verify = true
38
38
timeout = 5
39
+ api_version = 3
39
40
40
41
[somewhere]
41
42
url = https://some.whe.re
42
43
private_token = vTbFeqJYCY3sibBP7BZM
44
+ api_version = 4
43
45
44
46
[elsewhere]
45
47
url = http://else.whe.re:8080
@@ -78,6 +80,8 @@ section.
78
80
- URL for the GitLab server
79
81
* - ``private_token ``
80
82
- Your user token. Login/password is not supported.
83
+ * - ``api_version ``
84
+ - API version to use (``3 `` or ``4 ``), defaults to ``3 ``
81
85
* - ``http_username ``
82
86
- Username for optional HTTP authentication
83
87
* - ``http_password ``
You can’t perform that action at this time.
0 commit comments