Skip to content

Commit 124abab

Browse files
nejchJohnVillalovos
authored andcommitted
chore: use kwargs for http_request docs
1 parent b4d53f1 commit 124abab

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

docs/api-levels.rst

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,14 +86,19 @@ For example, if for whatever reason you want to fetch allowed methods for an end
8686
8787
>>> gl = gitlab.Gitlab(private_token=private_token)
8888
>>>
89-
>>> response = gl.http_request("OPTIONS", "/projects")
89+
>>> response = gl.http_request(verb="OPTIONS", path="/projects")
9090
>>> response.headers["Allow"]
9191
'OPTIONS, GET, POST, HEAD'
9292
9393
Or get the total number of a user's events with a customized HEAD request:
9494

9595
.. code-block:: python
9696
97-
>>> response = gl.http_request("HEAD", "/events", query_params={"sudo": "some-user"}, timeout=10)
97+
>>> response = gl.http_request(
98+
verb="HEAD",
99+
path="/events",
100+
query_params={"sudo": "some-user"},
101+
timeout=10
102+
)
98103
>>> response.headers["X-Total"]
99104
'123'

0 commit comments

Comments
 (0)