Object initialization :param Protocol protocol: A protocol class or instance to be used with this connection :param str main_resource: main_resource to be used in these API communications
(self, *, protocol=None, main_resource=None, **kwargs)
| 330 | _endpoints = {} # dict of all API service endpoints needed |
| 331 | |
| 332 | def __init__(self, *, protocol=None, main_resource=None, **kwargs): |
| 333 | """ Object initialization |
| 334 | |
| 335 | :param Protocol protocol: A protocol class or instance to be used with |
| 336 | this connection |
| 337 | :param str main_resource: main_resource to be used in these API |
| 338 | communications |
| 339 | """ |
| 340 | self.protocol = protocol() if isinstance(protocol, type) else protocol |
| 341 | if self.protocol is None: |
| 342 | raise ValueError('Protocol not provided to Api Component') |
| 343 | mr, bu = self.build_base_url(main_resource) |
| 344 | self.main_resource = mr |
| 345 | self._base_url = bu |
| 346 | |
| 347 | super().__init__() |
| 348 | |
| 349 | def __str__(self): |
| 350 | return self.__repr__() |
nothing calls this directly
no test coverage detected