跳转到主要内容

Highrise的Pythonic封装。

项目描述

highrise
=============

python-highrise是封装Highrise API的一种Python方式。

安装
-----------

easy_install ElementTree https://github.com/chriscohoat/highrise/tarball/master


使用
-----

# 导入highrise封装器。
from highrise.wrapper import Highrise

# 准备Highrise与API令牌和人员ID的交互
highrise_api_token = 'TOKEN_HERE'
person_highrise_id = 'PERSON_ID_HERE'
hr = Highrise('https://examplecorporation.highrisehq.com',highrise_api_token)

# 获取笔记列表或电子邮件列表
notes = hr.notes(person_highrise_id)
emails = hr.emails(person_highrise_id)

与笔记交互(使用Django)
-----

views.py

def highrise_interaction(request)

# 准备Highrise与API令牌和人员ID的交互
highrise_api_token = 'TOKEN_HERE'
person_highrise_id = 'PERSON_ID_HERE'
hr = Highrise('https://examplecorporation.highrisehq.com',highrise_api_token)

# 获取笔记列表或电子邮件列表
notes = hr.notes(person_highrise_id)

return render_to_response('template.html',{'notes':notes}, context_instance=RequestContext(request))

template.html

{% extends "base.html" %}

{% block content %}

{% if not notes %}
<h3>此人员没有可用的笔记。</h3>
{% else %}
{% for note in notes %}

<h3>关于 {{ note.subject_name }} 的笔记</h3>
<h4>添加于 {{ note.created_at }}</h4>
<p>
{{ note.body }}
<br />
<br />
<a href="https://examplecorporation.highrisehq.com/notes/{{ note.note_id }}" target="blank">阅读更多...</a>
</p>

{% endfor %}
{% endif %}

{% endblock %}

测试
-------

测试内容即将推出。

项目详情


由以下机构支持

AWS AWS 云计算和安全赞助商 Datadog Datadog 监控 Fastly Fastly CDN Google Google 下载分析 Microsoft Microsoft PSF 赞助商 Pingdom Pingdom 监控 Sentry Sentry 错误日志 StatusPage StatusPage 状态页面