diff options
| author | Gauvain Pocentek <gauvain@pocentek.net> | 2017-05-24 08:20:41 +0200 |
|---|---|---|
| committer | Gauvain Pocentek <gauvain@pocentek.net> | 2017-05-24 08:20:41 +0200 |
| commit | f2b94a7f2cef6ca7d5e6d87494ed3e90426d8d2b (patch) | |
| tree | c01ea39ab979dd8088737b2ded3806a4d3f71799 /docs | |
| parent | 627a6aa0620ec53dcb24a97c0e584d01dcc4d07f (diff) | |
| download | gitlab-f2b94a7f2cef6ca7d5e6d87494ed3e90426d8d2b.tar.gz | |
Add v4 support to docs
Diffstat (limited to 'docs')
| -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`` |
