(url, data)
Lightweight wrapper to add hubspot api key and post data if the HUBSPOT_API_KEY is defined
    :param url: url to post to
    :param data: json data payload
    :return:
Lightweight wrapper to add hubspot api key and post data if the HUBSPOT_API_KEY is defined
    :param url: url to post to
    :param data: json data payload
    :return:
Lightweight wrapper to add hubspot api key and post data if the HUBSPOT_API_KEY is defined : param url : url to post to : param data : json data payload : return :
def _hubspot_post(url, data):
    """
    Lightweight wrapper to add hubspot api key and post data if the HUBSPOT_API_KEY is defined
    :param url: url to post to
    :param data: json data payload
    :return:
    """
    api_key = settings.ANALYTICS_IDS.get('HUBSPOT_API_KEY', None)
    if api_key:
        headers = {
            'content-type': 'application/json'
        }
        params = {'hapikey': api_key}
        response = _send_post_data(url, params, data, headers)
        _log_response('HS', data, response)
        response.raise_for_status()
def _hubspot_post ( url , data ) : api_key = settings . ANALYTICS_IDS . get ( 'HUBSPOT_API_KEY' , None ) if api_key : headers = { 'content-type' : 'application/json' } params = { 'hapikey' : api_key } response = _send_post_data ( url , params , data , headers ) _log_response ( 'HS' , data , response ) response . raise_for_status ( )