Esempio n. 1
0
    def __init__(self, config=None, api=None):
        Service.__init__(self, config)

        if api is None:
            self._api = WikipediaAPI()
        else:
            self._api = api
Esempio n. 2
0
    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
Esempio n. 3
0
    def __init__(self, config=None, api=None):
        Service.__init__(self, config)

        if api is None:
            self._api = WikipediaAPI()
        else:
            self._api = api
Esempio n. 4
0
    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")
Esempio n. 5
0
    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")
Esempio n. 6
0
    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 = ''
Esempio n. 7
0
    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
Esempio n. 8
0
    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
Esempio n. 9
0
    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
Esempio n. 10
0
    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 = ''
Esempio n. 11
0
    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
Esempio n. 12
0
    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
Esempio n. 13
0
    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
Esempio n. 14
0
    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
Esempio n. 15
0
 def __init__(self, config):
     Service.__init__(self, config)
Esempio n. 16
0
 def __init__(self, config=None, api=None):
     Service.__init__(self, config)
Esempio n. 17
0
 def __init__(self, config):
     Service.__init__(self, config)
Esempio n. 18
0
 def __init__(self, config: BrainServiceConfiguration):
     Service.__init__(self, config)
Esempio n. 19
0
 def __init__(self, config):
     Service.__init__(self, config)
     self._response = "asked"
Esempio n. 20
0
 def __init__(self, config: BrainServiceConfiguration):
     Service.__init__(self, config)