synology/api.py
def camera_info(self, camera_ids, **kwargs):
        """Return a list of cameras matching camera_ids."""
        api = self._api_info['camera']
        payload = dict({
            '_sid': self._sid,
            'api': api['name'],
            'method': 'GetInfo',
            'version': api['version'],
            'cameraIds': ', '.join(str(id) for id in camera_ids),
        }, **kwargs)
        response = self._get_json_with_retry(api['url'], payload)

        cameras = []

        for data in response['data']['cameras']:
            cameras.append(Camera(data, self._video_stream_url))

        return cameras
def camera_info(self, camera_ids, **kwargs):
        api = self._api_info['camera']
        payload = dict({
            '_sid': self._sid,
            'api': api['name'],
            'method': 'GetInfo',
            'version': api['version'],
            'cameraIds': ', '.join(str(id) for id in camera_ids),
        }, **kwargs)
        response = self._get_json_with_retry(api['url'], payload)

        cameras = []

        for data in response['data']['cameras']:
            cameras.append(Camera(data, self._video_stream_url))

        return cameras
def camera_info ( self , camera_ids , * * kwargs ) : api = self . _api_info [ 'camera' ] payload = dict ( { '_sid' : self . _sid , 'api' : api [ 'name' ] , 'method' : 'GetInfo' , 'version' : api [ 'version' ] , 'cameraIds' : ', ' . join ( str ( id ) for id in camera_ids ) , } , * * kwargs ) response = self . _get_json_with_retry ( api [ 'url' ] , payload ) cameras = [ ] for data in response [ 'data' ] [ 'cameras' ] : cameras . append ( Camera ( data , self . _video_stream_url ) ) return cameras
Return a list of cameras matching camera_ids.
Return a list of cameras matching camera_ids .