예제 #1
0
파일: api.py 프로젝트: cantenesse/py-august
    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()]
예제 #2
0
def _mock_august_lock(lockid="mocklockid1", houseid="mockhouseid1"):
    return Lock(lockid, _mock_august_lock_data(lockid=lockid, houseid=houseid))
예제 #3
0
def _process_locks_json(json_dict):
    return [Lock(device_id, data) for device_id, data in json_dict.items()]