Ejemplo n.º 1
0
    def __init__(self, configuration=None, header_name=None, header_value=None,
                 cookie=None):
        if configuration is None:
            configuration = Configuration()
        self.configuration = configuration

        # Use the pool property to lazily initialize the ThreadPool.
        self._pool = None
        self.rest_client = rest.RESTClientObject(configuration)
        self.default_headers = {}
        if header_name is not None:
            self.default_headers[header_name] = header_value
        self.cookie = cookie
        # Set default User-Agent.
        self.user_agent = 'Swagger-Codegen/0.0.15/python'
Ejemplo n.º 2
0
 def __init__(self, credential):
     self.config = Configuration()
     self.config.api_key['Authorization'] = credential["api_key"]
     self.config.api_key_prefix['Authorization'] = 'Bearer'
     self.config.host = f"https://{credential['environment']}-api.shoonyacloud.com/api"