From e38512ce9b71ef148e3ccaef51822979743ba9e3 Mon Sep 17 00:00:00 2001 From: William Scanlon <6432770+w1ll1am23@users.noreply.github.com> Date: Wed, 25 Oct 2023 14:29:45 -0400 Subject: [PATCH] fix: Use new getUserDataForApp endpoint (#36) * fix: Use new getUserDataForApp endpoint Co-authored-by: w1ll1am23 --- src/pyeconet/api.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/pyeconet/api.py b/src/pyeconet/api.py index ca2b5fc..3d6cc68 100644 --- a/src/pyeconet/api.py +++ b/src/pyeconet/api.py @@ -182,11 +182,12 @@ async def get_equipment_by_type(self, equipment_type: List) -> Dict: async def _get_location(self) -> List[Dict]: _headers = HEADERS.copy() _headers["ClearBlade-UserToken"] = self._user_token + payload = {"location_only": False, "type": "com.econet.econetconsumerandroid", "version": "6.0.0-375-01b4870e"} _session = ClientSession() try: async with _session.post( - f"{REST_URL}/code/{CLEAR_BLADE_SYSTEM_KEY}/getLocation", headers=_headers + f"{REST_URL}/code/{CLEAR_BLADE_SYSTEM_KEY}/getUserDataForApp", json=payload, headers=HEADERS ) as resp: if resp.status == 200: _json = await resp.json()