MCPcopy Index your code
hub / github.com/googlemaps/google-maps-services-python / set_experience_id

Method set_experience_id

googlemaps/client.py:204–217  ·  view source on GitHub ↗

Sets the value for the HTTP header field name 'X-Goog-Maps-Experience-ID' to be used on subsequent API calls. :param experience_id_args: the experience ID :type experience_id_args: string varargs

(self, *experience_id_args)

Source from the content-addressed store, hash-verified

202 self.base_url = base_url
203
204 def set_experience_id(self, *experience_id_args):
205 """Sets the value for the HTTP header field name
206 'X-Goog-Maps-Experience-ID' to be used on subsequent API calls.
207
208 :param experience_id_args: the experience ID
209 :type experience_id_args: string varargs
210 """
211 if len(experience_id_args) == 0 or experience_id_args[0] is None:
212 self.clear_experience_id()
213 return
214
215 headers = self.requests_kwargs.pop("headers", {})
216 headers[_X_GOOG_MAPS_EXPERIENCE_ID] = ",".join(experience_id_args)
217 self.requests_kwargs["headers"] = headers
218
219 def get_experience_id(self):
220 """Gets the experience ID for the HTTP header field name

Callers 6

__init__Method · 0.95
_perform_mock_requestMethod · 0.95

Calls 1

clear_experience_idMethod · 0.95