MCPcopy Index your code
hub / github.com/googleapis/google-api-python-client / _add_query_parameter

Function _add_query_parameter

googleapiclient/_helpers.py:191–207  ·  view source on GitHub ↗

Adds a query parameter to a url. Replaces the current value if it already exists in the URL. Args: url: string, url to add the query parameter to. name: string, query parameter name. value: string, query parameter value. Returns: Updated query parameter

(url, name, value)

Source from the content-addressed store, hash-verified

189
190
191def _add_query_parameter(url, name, value):
192 """Adds a query parameter to a url.
193
194 Replaces the current value if it already exists in the URL.
195
196 Args:
197 url: string, url to add the query parameter to.
198 name: string, query parameter name.
199 value: string, query parameter value.
200
201 Returns:
202 Updated query parameter. Does not update the url if value is None.
203 """
204 if value is None:
205 return url
206 else:
207 return update_query_params(url, {name: value})

Callers 3

_retrieve_discovery_docFunction · 0.90
methodFunction · 0.90
methodNextFunction · 0.90

Calls 1

update_query_paramsFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…