Skip to content
This repository was archived by the owner on Apr 4, 2025. It is now read-only.

Commit b558105

Browse files
clarify query docs
1 parent 71da8dd commit b558105

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

synadm/api.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,15 +120,20 @@ def query(
120120
121121
Handles requests methods, logging and exceptions, and URL encoding.
122122
123+
The arguments "method" and "params" are passed to requests.request
124+
as is.
125+
123126
Args:
124127
method: The http method to use (get, post, put, ...)
125128
urlpart: The path to the API endpoint, excluding self.base_url and
126129
self.path (the part after proto://fqdn:port/path). It will be
127130
passed to Python's str.format, so the string should not be
128131
already formatted (as f-strings or with str.format) as to
129132
sanitize the URL.
130-
params: URL parameters (?param1&param2)..
131-
data: Request body used in POST, PUT, DELETE requests.
133+
params (dict): URL queries (?param1&param2). Use a list type
134+
for the value to achieve ?param1=value1&param1=value2.
135+
data: Request body used in POST, PUT, DELETE requests, encoded
136+
as JSON.
132137
token: An optional token overriding the configured one.
133138
base_url_override: The default setting of self.base_url set
134139
on initialization can be overwritten using this argument.

0 commit comments

Comments
 (0)