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", [])]
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', [])]
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", [])]