Skip to content

Commit

Permalink
fix: Use new getUserDataForApp endpoint (#36)
Browse files Browse the repository at this point in the history
* fix: Use new getUserDataForApp endpoint

Co-authored-by: w1ll1am23 <[email protected]>
  • Loading branch information
w1ll1am23 and w1ll1am23 authored Oct 25, 2023
1 parent 5ea4712 commit e38512c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/pyeconet/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit e38512c

Please sign in to comment.