summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorNejc Habjan <nejc.habjan@siemens.com>2022-10-16 19:57:27 +0200
committerJohn Villalovos <john@sodarock.com>2022-10-16 11:08:14 -0700
commit124abab483ab6be71dbed91b8d518ae27355b9ae (patch)
treef625cdb2cbc54c1195c2a9540c9313ff6448e06a /docs
parentb4d53f1abb264cd9df8e4ac6560ab0895080d867 (diff)
downloadgitlab-124abab483ab6be71dbed91b8d518ae27355b9ae.tar.gz
chore: use kwargs for http_request docs
Diffstat (limited to 'docs')
-rw-r--r--docs/api-levels.rst9
1 files changed, 7 insertions, 2 deletions
diff --git a/docs/api-levels.rst b/docs/api-levels.rst
index 5c6a8d6..5a52b78 100644
--- a/docs/api-levels.rst
+++ b/docs/api-levels.rst
@@ -86,7 +86,7 @@ For example, if for whatever reason you want to fetch allowed methods for an end
>>> gl = gitlab.Gitlab(private_token=private_token)
>>>
- >>> response = gl.http_request("OPTIONS", "/projects")
+ >>> response = gl.http_request(verb="OPTIONS", path="/projects")
>>> response.headers["Allow"]
'OPTIONS, GET, POST, HEAD'
@@ -94,6 +94,11 @@ Or get the total number of a user's events with a customized HEAD request:
.. code-block:: python
- >>> response = gl.http_request("HEAD", "/events", query_params={"sudo": "some-user"}, timeout=10)
+ >>> response = gl.http_request(
+ verb="HEAD",
+ path="/events",
+ query_params={"sudo": "some-user"},
+ timeout=10
+ )
>>> response.headers["X-Total"]
'123'