def _get_capture_url(self, model, base_url, username=None, password=None, resolution=None):
        """
        Return capture URL for a particular camera model.
        """
        query_params = {}

        if model == 'easyn':
            url = base_url + '/snapshot.jpg'
            if username:
                query_params['user'] = username
            if password:
                query_params['pwd'] = password
            if resolution:
                query_params['resolution'] = resolution
        else:
            raise ValueError('Unsupported model: %s' % (model))

        if query_params:
            url = url + '?' + urllib.parse.urlencode(query_params)

        return url
dataset/ETHPy150Open StackStorm/st2contrib/packs/ipcam/actions/capture_screenshot.py/CaptureScreenshotAction._get_capture_url/original