diff options
| -rw-r--r-- | docs/api-usage.rst | 14 | ||||
| -rw-r--r-- | docs/cli.rst | 4 |
2 files changed, 18 insertions, 0 deletions
diff --git a/docs/api-usage.rst b/docs/api-usage.rst index 4f78df1..eae26db 100644 --- a/docs/api-usage.rst +++ b/docs/api-usage.rst @@ -40,6 +40,20 @@ You can also use configuration files to create ``gitlab.Gitlab`` objects: See the :ref:`cli_configuration` section for more information about configuration files. +**GitLab v4 support** + +``python-gitlab`` uses the v3 GitLab API by default. Use the ``api_version`` +parameter to switch to v4: + +.. code-block:: python + + import gitlab + + gl = gitlab.Gitlab('http://10.0.0.1', 'JVNSESs8EwWRx5yDxM5q', api_version=4) + +.. warning:: + + The v4 support is experimental. Managers ======== diff --git a/docs/cli.rst b/docs/cli.rst index 8b79d78..6730c9b 100644 --- a/docs/cli.rst +++ b/docs/cli.rst @@ -36,10 +36,12 @@ The configuration file uses the ``INI`` format. It contains at least a default = somewhere ssl_verify = true timeout = 5 + api_version = 3 [somewhere] url = https://some.whe.re private_token = vTbFeqJYCY3sibBP7BZM + api_version = 4 [elsewhere] url = http://else.whe.re:8080 @@ -78,6 +80,8 @@ section. - URL for the GitLab server * - ``private_token`` - Your user token. Login/password is not supported. + * - ``api_version`` + - API version to use (``3`` or ``4``), defaults to ``3`` * - ``http_username`` - Username for optional HTTP authentication * - ``http_password`` |
