Example #1
0
    def __init__(self, config=None, api=None):
        Service.__init__(self, config)

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

        if api is None:
            self._api = WikipediaAPI()
        else:
            self._api = api
Example #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")
Example #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")
Example #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 = ''
Example #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
Example #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
Example #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
    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 = ''
Example #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
Example #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
Example #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
Example #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
Example #15
0
 def __init__(self, config):
     Service.__init__(self, config)
Example #16
0
 def __init__(self, config=None, api=None):
     Service.__init__(self, config)
Example #17
0
 def __init__(self, config):
     Service.__init__(self, config)
Example #18
0
 def __init__(self, config: BrainServiceConfiguration):
     Service.__init__(self, config)
 def __init__(self, config):
     Service.__init__(self, config)
     self._response = "asked"
Example #20
0
 def __init__(self, config: BrainServiceConfiguration):
     Service.__init__(self, config)