跳转到主要内容

对HubSpot API进行请求的轻量级抽象层

项目描述

https://travis-ci.org/2degrees/hubspot-connection.png?branch=master https://coveralls.io/repos/2degrees/hubspot-connection/badge.png?branch=master
下载

http://pypi.python.org/pypi/hubspot-connection

赞助商

2degrees Limited.

hubspot-connection 为对HubSpot API进行请求提供轻量级抽象层。

以下是使用示例

from hubspot.connection import APIKey
from hubspot.connection import PortalConnection

authentication_key = APIKey('HUBSPOT-API-KEY')
with PortalConnection(authentication_key, 'client') as connection:
    contacts_data = connection.send_get_request('/contacts/v1/contacts/statistics')
    print("Number of contacts: {}".format(contacts_data.get('contacts')))

该项目在Python 2.7和Python 3.4下官方支持,可能与Python 2.6兼容。

版本1.0发布候选版1 (2014-06-23)

这是第一个公开版本。

版本1.0发布候选版2 (2014-07-14)

  • 为带正文的请求添加了content-type=’application/json’

版本1.0发布候选版3 (2014-09-15)

  • 仅在期望内容时强制使用content-type

版本1.0发布候选版4 (2015-02-18)

  • 允许在HubSpot的错误响应中包含额外详细信息

版本1.0发布候选版5 (2016-03-18)

  • 通过:@jtprince 添加了Python 3.4和3.5兼容性

由以下组织支持