<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def update(self, update_cameras=False, update_base_station=False):
 """Refresh object."""

        self._authenticate()

        # update attributes in all cameras to avoid duped queries
        if update_cameras:
            url = DEVICES_ENDPOINT
            response = self.query(url)
            if not response or not isinstance(response, dict):
                return

            for camera in self.cameras:
                for dev_info in response.get('data'):
                    if dev_info.get('deviceName') == camera.name:
                        _LOGGER.debug("Refreshing %s attributes", camera.name)
                        camera.attrs = dev_info

                # preload cached videos
                # the user is still able to force a new query by
                # calling the Arlo.video()
                camera.make_video_cache()

        # force update base_station
        if update_base_station:
            for base in self.base_stations:
                base.update()