How to use the hubspot3.utils.get_log function in hubspot3

To help you get started, we’ve selected a few hubspot3 examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github jpetrucciani / hubspot3 / hubspot3 / ecommerce_bridge.py View on Github external
def __init__(self, *args, **kwargs):
        """initialize an ecommerce bridge client"""
        super(EcommerceBridgeClient, self).__init__(*args, **kwargs)
        self.log = get_log("hubspot3.ecommerce_bridge")
github jpetrucciani / hubspot3 / hubspot3 / crm_pipelines.py View on Github external
def __init__(self, *args, **kwargs):
        super(PipelinesClient, self).__init__(*args, **kwargs)
        self.log = get_log("hubspot3.crm-pipelines")
github jpetrucciani / hubspot3 / hubspot3 / lines.py View on Github external
def __init__(self, *args, **kwargs):
        super(LinesClient, self).__init__(*args, **kwargs)
        self.log = get_log("hubspot3.lines")
github jpetrucciani / hubspot3 / hubspot3 / base.py View on Github external
) -> None:
        super(BaseClient, self).__init__()
        # reverse so that the first one in the list because the first parent
        if not mixins:
            mixins = []
        mixins.reverse()
        for mixin_class in mixins:
            if mixin_class not in self.__class__.__bases__:
                self.__class__.__bases__ = (mixin_class,) + self.__class__.__bases__

        self.api_key = api_key
        self.access_token = access_token
        self.refresh_token = refresh_token
        self.client_id = client_id
        self.client_secret = client_secret
        self.log = utils.get_log("hubspot3")
        if not disable_auth:
            if self.api_key and self.access_token:
                raise HubspotBadConfig("Cannot use both api_key and access_token.")
            if not (self.api_key or self.access_token or self.refresh_token):
                raise HubspotNoConfig("Missing required credentials.")
        self.options = {
            "api_base": api_base,
            "debug": debug,
            "disable_auth": disable_auth,
            "timeout": timeout,
        }
        self.options.update(extra_options)
        self._prepare_connection_type()
github jpetrucciani / hubspot3 / hubspot3 / oauth2.py View on Github external
def __init__(self, *args, **kwargs):
        """initialize a contacts client"""
        # Since this client is used to generate tokens for authentication, it does not require
        # authentication itself.
        kwargs["disable_auth"] = True
        super(OAuth2Client, self).__init__(*args, **kwargs)
        self.log = get_log("hubspot3.oauth2")
        self.options["content_type"] = "application/x-www-form-urlencoded"
        # Make sure that certain credentials that wouldn't be used anyway are not set. Not having
        # an access token will also make sure that the `_call_raw` implementation does not try to
        # refresh access tokens on its own.
        self.api_key = None
        self.access_token = None
github jpetrucciani / hubspot3 / hubspot3 / email_subscription.py View on Github external
def __init__(self, *args, **kwargs):
        """initialize an email subscription client"""
        super(EmailSubscriptionClient, self).__init__(*args, **kwargs)
        self.log = get_log("hubspot3.email_subscription")
github jpetrucciani / hubspot3 / hubspot3 / workflows.py View on Github external
def __init__(self, *args, **kwargs):
        """initialize a workflows client"""
        super(WorkflowsClient, self).__init__(*args, **kwargs)
        self.log = get_log("hubspot3.workflows")
github jpetrucciani / hubspot3 / hubspot3 / companies.py View on Github external
def __init__(self, *args, **kwargs):
        super(CompaniesClient, self).__init__(*args, **kwargs)
        self.log = get_log("hubspot3.companies")
github jpetrucciani / hubspot3 / hubspot3 / tickets.py View on Github external
def __init__(self, *args, **kwargs):
        """initialize a tickets client"""
        super(TicketsClient, self).__init__(*args, **kwargs)
        self.log = get_log("hubspot3.tickets")
github jpetrucciani / hubspot3 / hubspot3 / properties.py View on Github external
def __init__(self, *args, **kwargs):
        super(PropertiesClient, self).__init__(*args, **kwargs)
        self.log = get_log("hubspot3.properties")