def __init__(self, config=None, api=None): Service.__init__(self, config) if api is None: self._api = WikipediaAPI() else: self._api = api
def __init__(self, config: BrainServiceConfiguration, api=None): Service.__init__(self, config) if api is None: self.api = RestAPI() else: self.api = api if config.method is None: self.method = "GET" else: self.method = config.method if config.host is None: raise Exception("Undefined host parameter") self.host = config.host self.port = None if config.port is not None: self.port = config.port self.url = None if config.url is not None: self.url = config.url self._status_code = '' self._latency = '' self._start_time = None self._end_time = None
def __init__(self, config: BrainServiceConfiguration, api=None): Service.__init__(self, config) if api is None: self.api = PandoraAPI() else: self.api = api if config.url is None: raise Exception("Undefined url parameter")
def __init__(self, config: BrainServiceConfiguration, api=None): Service.__init__(self, config) if api is None: self.api = PublishedBotAPI() else: self.api = api self._botInfo = None self._userId = None self._status_code = ''
def __init__(self, config: BrainServiceConfiguration, api=None): Service.__init__(self, config) if api is None: self.api = WeatherAPI() else: self.api = api if config is None: raise Exception("Undefined url parameter") else: self.config=config
def __init__(self, config=None, api=None): Service.__init__(self, config) if api is None: self._api = DuckDuckGoAPI() else: self._api = api self._url = None if config._url is None: raise Exception("Undefined url parameter") else: self._url = config.url
def __init__(self, config: BrainServiceConfiguration, api=None): Service.__init__(self, config) if api is None: self.api = PublishedRestAPI() else: self.api = api self._host = None self._method = None self._query = None self._header = None self._body = None self._status_code = ''
def __init__(self, config: BrainServiceConfiguration, api=None): Service.__init__(self, config) if api is None: self.api = PublishedRestAPI() else: self.api = api self._params = None self._status_code = '' self._latency = '' self._start_time = None self._end_time = None
def __init__(self, config: BrainServiceConfiguration, api=None): Service.__init__(self, config) if api is None: self.api = RestAPI() else: self.api = api self.payload = {} if config.method is None: self.method = "GET" else: self.method = config.method if config.host is None: raise Exception("Undefined host parameter") self.host = config.host
def __init__(self, config: BrainServiceConfiguration, api=None): Service.__init__(self, config) if api is None: self.api = RestAPI() else: self.api = api if config.method is None: self.method = "GET" else: self.method = config.method if config.host is None: raise Exception("Undefined host parameter") self.host = config.host self.port = None if config.port is not None: self.port = config.port self.url = None if config.url is not None: self.url = config.url
def __init__(self, config: BrainServiceConfiguration, api=None): Service.__init__(self, config) if api is None: self.api = RestAPI() else: self.api = api if config.method is None: self.method = "GET" else: self.method = config.method self.host = None if config.host is not None: self.host = config.host self.port = None if config.port is not None: self.port = config.port self.url = None if config.url is not None: self.url = config.url
def __init__(self, config): Service.__init__(self, config)
def __init__(self, config=None, api=None): Service.__init__(self, config)
def __init__(self, config: BrainServiceConfiguration): Service.__init__(self, config)
def __init__(self, config): Service.__init__(self, config) self._response = "asked"