def get_locks(self, access_token): json = self._call_api( "get", API_GET_LOCKS_URL, access_token=access_token).json() return [Lock(device_id, data) for device_id, data in json.items()]
def _mock_august_lock(lockid="mocklockid1", houseid="mockhouseid1"): return Lock(lockid, _mock_august_lock_data(lockid=lockid, houseid=houseid))
def _process_locks_json(json_dict): return [Lock(device_id, data) for device_id, data in json_dict.items()]