예제 #1
0
    async def async_get_pins(self, access_token, lock_id):
        response = await self._async_dict_to_api(
            self._build_get_pins_request(access_token, lock_id)
        )
        json_dict = await response.json()

        return [Pin(pin_json) for pin_json in json_dict.get("loaded", [])]
예제 #2
0
파일: api.py 프로젝트: sidoh/py-august
    def get_pins(self, access_token, lock_id):
        json = self._call_api(
            "get",
            API_GET_PINS_URL.format(lock_id=lock_id),
            access_token=access_token
        ).json()

        return [Pin(pin_json) for pin_json in json.get('loaded', [])]
예제 #3
0
    def get_pins(self, access_token, lock_id):
        json_dict = self._dict_to_api(
            self._build_get_pins_request(access_token, lock_id)).json()

        return [Pin(pin_json) for pin_json in json_dict.get("loaded", [])]