MCPcopy Index your code
hub / github.com/O365/python-o365 / __init__

Method __init__

O365/utils/utils.py:332–347  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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__()

Callers

nothing calls this directly

Calls 2

build_base_urlMethod · 0.95
__init__Method · 0.45

Tested by

no test coverage detected